Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function TrelloStrategy(options, verify) {
OAuth1Strategy.call(this, Object.assign({
requestTokenURL: 'https://trello.com/1/OAuthGetRequestToken',
accessTokenURL: 'https://trello.com/1/OAuthGetAccessToken',
userAuthorizationURL: 'https://trello.com/1/OAuthAuthorizeToken',
sessionKey: 'trello',
consumerKey: options.clientID,
consumerSecret: options.clientSecret
}, options), (req, accessToken, refreshToken, profile, done) => {
request(`https://api.trello.com/1/members/me?key=${options.clientID}&token=${accessToken}`,
(err, response, body) => {
if (err) return done(err);
const profile = JSON.parse(body);
const namePieces = profile.fullName.split(' ');
const result = { id: profile.id };
result[config.auth.columns.user.firstName] = namePieces.shift();
result[config.auth.columns.user.lastName] = namePieces.join(' ');
result[config.auth.columns.user.email] = null;
function TrelloStrategy(options, verify) {
options = options || {};
options.requestTokenURL = options.requestTokenURL || 'https://trello.com/1/OAuthGetRequestToken';
options.accessTokenURL = options.accessTokenURL || 'https://trello.com/1/OAuthGetAccessToken';
options.userAuthorizationURL = options.userAuthorizationURL || 'https://trello.com/1/OAuthAuthorizeToken';
options.sessionKey = options.sessionKey || 'trello';
OAuth1Strategy.call(this, options, (req, accessToken, refreshToken, profile, done) => {
request(
'https://api.trello.com/1/members/me?key='+options.consumerKey+'&token='+accessToken,
function (error, response, body) {
if(error) {
return done(error);
}
var profile = JSON.parse(body);
var namePieces = profile.fullName.split(' ');
verify(req, accessToken, refreshToken, {
id: profile.id,
firstName: namePieces.shift(),
lastName: namePieces.join(' '),
email: null
}, done);
}
);
function Strategy(options, verify) {
options = options || {};
options.requestTokenURL = options.requestTokenURL || 'https://www.evernote.com/oauth';
options.accessTokenURL = options.accessTokenURL || 'https://www.evernote.com/oauth';
options.userAuthorizationURL = options.userAuthorizationURL || 'https://www.evernote.com/OAuth.action';
options.sessionKey = options.sessionKey || 'oauth:evernote';
OAuthStrategy.call(this, options, verify);
this.name = 'evernote';
}
function Strategy(options, verify) {
options = options || {};
options.requestTokenURL = options.requestTokenURL || 'https://api.dropbox.com/1/oauth/request_token';
options.accessTokenURL = options.accessTokenURL || 'https://api.dropbox.com/1/oauth/access_token';
var params = { oauth_callback: options.callbackURL };
options.userAuthorizationURL = options.userAuthorizationURL || 'https://www.dropbox.com/1/oauth/authorize?' + querystring.stringify(params);
options.sessionKey = options.sessionKey || 'oauth:dropbox';
OAuthStrategy.call(this, options, verify);
this.name = 'dropbox';
}
function Strategy(options, verify) {
options = options || {};
options.requestTokenURL = options.requestTokenURL || 'https://api.twitter.com/oauth/request_token';
options.accessTokenURL = options.accessTokenURL || 'https://api.twitter.com/oauth/access_token';
options.userAuthorizationURL = options.userAuthorizationURL || 'https://api.twitter.com/oauth/authenticate';
options.sessionKey = options.sessionKey || 'oauth:twitter';
OAuthStrategy.call(this, options, verify);
this.name = 'twitter';
this._userProfileURL = options.userProfileURL || 'https://api.twitter.com/1.1/account/verify_credentials.json';
this._skipExtendedUserProfile = (options.skipExtendedUserProfile !== undefined) ? options.skipExtendedUserProfile : false;
this._includeEmail = (options.includeEmail !== undefined) ? options.includeEmail : false;
this._includeStatus = (options.includeStatus !== undefined) ? options.includeStatus : true;
this._includeEntities = (options.includeEntities !== undefined) ? options.includeEntities : true;
}
function Strategy(options, verify) {
options = options || {};
options.requestTokenURL = options.requestTokenURL || 'https://api.twitter.com/oauth/request_token';
options.accessTokenURL = options.accessTokenURL || 'https://api.twitter.com/oauth/access_token';
options.userAuthorizationURL = options.userAuthorizationURL || 'https://api.twitter.com/oauth/authenticate';
options.sessionKey = options.sessionKey || 'oauth:twitter';
OAuthStrategy.call(this, options, verify);
this.name = 'twitter';
this._userProfileURL = options.userProfileURL || 'https://api.twitter.com/1.1/users/show.json';
this._skipExtendedUserProfile = (options.skipExtendedUserProfile !== undefined) ? options.skipExtendedUserProfile : false;
}
function Strategy(options, verify) {
options = options || {};
options.requestTokenURL = options.requestTokenURL || 'https://www.evernote.com/oauth';
options.accessTokenURL = options.accessTokenURL || 'https://www.evernote.com/oauth';
options.userAuthorizationURL = options.userAuthorizationURL || 'https://www.evernote.com/OAuth.action';
options.sessionKey = options.sessionKey || 'oauth:evernote';
OAuthStrategy.call(this, options, verify);
this.name = 'evernote';
}