File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 22
33const Router = require ( 'express' ) . Router
44const passport = require ( 'passport' )
5- const OAuth2Strategy = require ( 'passport-oauth2' ) . Strategy
5+ const { Strategy , InternalOAuthError } = require ( 'passport-oauth2' )
66const config = require ( '../../../config' )
77const { setReturnToFromReferer, passportGeneralCallback} = require ( '../utils' )
88
99let oauth2Auth = module . exports = Router ( )
1010
11- class OAuth2CustomStrategy extends OAuth2Strategy {
11+ class OAuth2CustomStrategy extends Strategy {
1212 constructor ( options , verify ) {
1313 options . customHeaders = options . customHeaders || { }
1414 super ( options , verify )
@@ -22,7 +22,7 @@ class OAuth2CustomStrategy extends OAuth2Strategy {
2222 var json
2323
2424 if ( err ) {
25- return done ( new passport . InternalOAuthError ( 'Failed to fetch user profile' , err ) )
25+ return done ( new InternalOAuthError ( 'Failed to fetch user profile' , err ) )
2626 }
2727
2828 try {
@@ -67,7 +67,7 @@ OAuth2CustomStrategy.prototype.userProfile = function (accessToken, done) {
6767 var json
6868
6969 if ( err ) {
70- return done ( new passport . InternalOAuthError ( 'Failed to fetch user profile' , err ) )
70+ return done ( new InternalOAuthError ( 'Failed to fetch user profile' , err ) )
7171 }
7272
7373 try {
You can’t perform that action at this time.
0 commit comments