Merge pull request #5800 from RocketChat/oauth-server-fix

OAuth server fix
pull/5803/head
Gabriel Engel 9 years ago committed by GitHub
commit 7b4307fceb
  1. 5
      packages/rocketchat-custom-oauth/custom_oauth_server.js
  2. 2
      packages/rocketchat-oauth2-server-config/oauth/client/oauth2-client.coffee

@ -149,6 +149,11 @@ export class CustomOAuth {
let identity = self.getIdentity(accessToken);
if (identity) {
// Set 'id' to '_id' for any sources that provide it
if (identity._id && !identity.id) {
identity.id = identity._id;
}
// Fix for Reddit
if (identity.result) {
identity = identity.result;

@ -42,6 +42,6 @@ Template.authorize.events
Template.authorize.onRendered ->
@autorun (c) =>
if Meteor.user()?.oauth?.athorizedClients?.indexOf(@data.client_id()) > -1
if Meteor.user()?.oauth?.authorizedClients?.indexOf(@data.client_id()) > -1
c.stop()
$('button[type=submit]').click()

Loading…
Cancel
Save