@ -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,
const identity = options.identity || getIdentity(options.accessToken, options.appId, options.appSecret, options.accessTokenSecret);