How to use passport-oauth.prototype:
137 138 139 140 141 142 143 144 145 146 147 148
if (req.query && req.query.oauth_problem) { return this.fail(); } // Call the base class for standard OAuth authentication. OAuthStrategy.prototype.authenticate.call(this, req, options); }; /** * Retrieve user profile from Etsy
How to use passport-oauth.call:
54 55 56 57 58 59 60 61 62 63
options.requestTokenURL = options.requestTokenURL || 'https://openapi.etsy.com/v2/oauth/request_token'; //url used to obtain unauthorized req token options.accessTokenURL = options.accessTokenURL || 'https://openapi.etsy.com/v2/oauth/access_token'; //url used to exchange user-authorized req token for access token options.userAuthorizationURL = options.userAuthorizationURL || 'https://www.etsy.com/oauth/signin'; //url used to sign user in options.sessionKey = options.sessionkey || 'oauth:etsy'; OAuthStrategy.call(this, options, verify); this.name = 'etsy'; this._profileFields = options.profileFields || null; // Etsy accepts an extended scope parameter when obtaining a request