summaryrefslogtreecommitdiff
path: root/lib/web
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-11-16 11:45:50 +0100
committerGitHub2018-11-16 11:45:50 +0100
commitf1367ba2702100a420477151d90e6a0b1999ffb3 (patch)
treeded95188a0f7148f3df5d10cdf68ce6e7947fbba /lib/web
parentdb69983a622693962a0fd42b2f091b3f3b6f6906 (diff)
parent56c043424dfdeb7e0568ecc76bf9e754696881a0 (diff)
Merge pull request #1058 from ccoenen/bug/oauth2internalerror
InternalOAuthError is not part of passport, but of passport-oauth2 #1056
Diffstat (limited to '')
-rw-r--r--lib/web/auth/oauth2/index.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/web/auth/oauth2/index.js b/lib/web/auth/oauth2/index.js
index f2a3132d..b9160f6e 100644
--- a/lib/web/auth/oauth2/index.js
+++ b/lib/web/auth/oauth2/index.js
@@ -2,13 +2,13 @@
const Router = require('express').Router
const passport = require('passport')
-const OAuth2Strategy = require('passport-oauth2').Strategy
+const { Strategy, InternalOAuthError } = require('passport-oauth2')
const config = require('../../../config')
const {setReturnToFromReferer, passportGeneralCallback} = require('../utils')
let oauth2Auth = module.exports = Router()
-class OAuth2CustomStrategy extends OAuth2Strategy {
+class OAuth2CustomStrategy extends Strategy {
constructor (options, verify) {
options.customHeaders = options.customHeaders || {}
super(options, verify)
@@ -22,7 +22,7 @@ class OAuth2CustomStrategy extends OAuth2Strategy {
var json
if (err) {
- return done(new passport.InternalOAuthError('Failed to fetch user profile', err))
+ return done(new InternalOAuthError('Failed to fetch user profile', err))
}
try {
@@ -67,7 +67,7 @@ OAuth2CustomStrategy.prototype.userProfile = function (accessToken, done) {
var json
if (err) {
- return done(new passport.InternalOAuthError('Failed to fetch user profile', err))
+ return done(new InternalOAuthError('Failed to fetch user profile', err))
}
try {