Pārlūkot izejas kodu

Update Oauth login to current API format

GRUNBLATT Remy 5 gadi atpakaļ
vecāks
revīzija
d0b6e8fd16
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4 4
      src/converse-oauth.js

+ 4 - 4
src/converse-oauth.js

@@ -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({
-                    'jid': `${profile.name}@${this.provider.get('host')}`,
-                    'password': response.access_token
-                });
+                _converse.api.user.login(
+                    `${profile.name}@${this.provider.get('host')}`,
+                    response.access_token
+                );
             },
             },
 
 
             async oauthLogin (ev) {
             async oauthLogin (ev) {