added check identity to fb and twitter

pull/9816/head
Marcos Defendi 8 years ago
parent a9da4524e8
commit ddbc8e42ec
  1. 3
      packages/rocketchat-lib/server/oauth/facebook.js
  2. 3
      packages/rocketchat-lib/server/oauth/twitter.js

@ -37,7 +37,8 @@ RocketChat.registerAccessTokenService('facebook', function(options) {
check(options, Match.ObjectIncluding({
accessToken: String,
secret: String,
expiresIn: Match.Integer
expiresIn: Match.Integer,
identity: Match.Maybe(Object)
}));
const identity = options.identity || getIdentity(options.accessToken, whitelisted, options.secret);

@ -33,7 +33,8 @@ RocketChat.registerAccessTokenService('twitter', function(options) {
appSecret: String,
appId: String,
accessTokenSecret: String,
expiresIn: Match.Integer
expiresIn: Match.Integer,
identity: Match.Maybe(Object)
}));
const identity = options.identity || getIdentity(options.accessToken, options.appId, options.appSecret, options.accessTokenSecret);

Loading…
Cancel
Save