Commit d0b6e8fd authored by GRUNBLATT Remy's avatar GRUNBLATT Remy Committed by JC Brand

Update Oauth login to current API format

parent 07abbfc5
...@@ -109,10 +109,10 @@ converse.plugins.add("converse-oauth", { ...@@ -109,10 +109,10 @@ converse.plugins.add("converse-oauth", {
async fetchOAuthProfileDataAndLogin () { async fetchOAuthProfileDataAndLogin () {
const profile = await this.oauth_service.api('me'); const profile = await this.oauth_service.api('me');
const response = this.oauth_service.getAuthResponse(); const response = this.oauth_service.getAuthResponse();
_converse.api.user.login({ _converse.api.user.login(
'jid': `${profile.name}@${this.provider.get('host')}`, `${profile.name}@${this.provider.get('host')}`,
'password': response.access_token response.access_token
}); );
}, },
async oauthLogin (ev) { async oauthLogin (ev) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment