1
0
Fork 0
mirror of synced 2024-06-01 18:20:18 +12:00

remove duplicate scope definition

scope can be defined both within the strategy declaration or when invoking passport
This commit is contained in:
Rory Powell 2021-07-08 15:21:54 +01:00
parent 6be38bcefd
commit 1c18b4c6ac
2 changed files with 2 additions and 2 deletions

View file

@ -110,8 +110,7 @@ exports.strategyFactory = async function (config, callbackUrl) {
userInfoURL: body.userinfo_endpoint,
clientID: clientId,
clientSecret: clientSecret,
callbackURL: callbackUrl,
scope: "profile email",
callbackURL: callbackUrl
},
authenticate
)

View file

@ -153,6 +153,7 @@ exports.oidcPreAuth = async (ctx, next) => {
const strategy = await oidcStrategyFactory(ctx)
return passport.authenticate(strategy, {
// required 'openid' scope is added by oidc strategy factory
scope: ["profile", "email"],
})(ctx, next)
}