Currently, I can able to connect with strophe by giving jid and password in Angular project. But by giving jid and password is not safe. Instead of giving jid and password, is there any other way like JWT simple authentication? Ejabberd is hosted in local system with Windows OS.
I am looking for token based login.
this._xmppConnection = new Strophe.Connection("http://localhost:5280/bosh/", { 'keepalive': true });
this._xmppConnection.connect(jid, password, this._onConnect);
// working one
I am looking for connecting strophe using JWT token. Is there such support in ejabberd?
@sahal You can achieve that using other mediums of authentication eg. OAuth token
Generate OAuth token for user using ejabberd api.
While creating strophe instance pass option mechanisms as [Strophe.SASLXOAuth2]
While connecting replace password with your oauth token eg. connection.connect(jid, ejabberd_oauth_token)