Skip to content

Commit

Permalink
feat(auth): OAuth2 scope support (#5181)
Browse files Browse the repository at this point in the history
  • Loading branch information
myml committed Apr 12, 2022
1 parent 8dcbc18 commit 74887ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/modules/authentication/oauth2/authentication.js
Expand Up @@ -17,7 +17,8 @@ module.exports = {
clientSecret: conf.clientSecret,
userInfoURL: conf.userInfoURL,
callbackURL: conf.callbackURL,
passReqToCallback: true
passReqToCallback: true,
scope: conf.scope
}, async (req, accessToken, refreshToken, profile, cb) => {
try {
const user = await WIKI.models.users.processProfile({
Expand Down
5 changes: 5 additions & 0 deletions server/modules/authentication/oauth2/definition.yml
Expand Up @@ -59,3 +59,8 @@ props:
title: Logout URL
hint: (optional) Logout URL on the OAuth2 provider where the user will be redirected to complete the logout process.
order: 9
scope:
type: String
title: Scope
hint: (optional) Application Client permission scopes.
order: 10

0 comments on commit 74887ba

Please sign in to comment.