callbackURL has fix location, rather than being a parameter.

This commit is contained in:
Paul Rodwell 2021-11-04 10:12:59 +00:00
parent 7eba6ba411
commit 88b0e2b825
No known key found for this signature in database
GPG Key ID: 083BA337597C49E6
2 changed files with 1 additions and 2 deletions

View File

@ -54,7 +54,6 @@ Sometimes, you'll be able to look up the URLs by visiting your provider's
"oauth2_AuthorizationURL": "https://auth.example.com/auth/realms/Wiki.Cafe/protocol/openid-connect/auth",
"oauth2_TokenURL": "https://auth.example.com/auth/realms/Wiki.Cafe/protocol/openid-connect/token",
"oauth2_UserInfoURL": "https://auth.example.com/auth/realms/Wiki.Cafe/protocol/openid-connect/userinfo",
"oauth2_CallbackURL": "http://localhost:3000/auth/oauth2/callback",
"oauth2_UsernameField": "profile.preferred_username"
}
```

View File

@ -220,7 +220,7 @@ module.exports = exports = (log, loga, argv) ->
authorizationURL: argv.oauth2_AuthorizationURL
tokenURL: argv.oauth2_TokenURL,
# not all providers have a way of specifying the callback URL
callbackURL: argv.oauth2_CallbackURL,
callbackURL: callbackProtocol + '//' + callbackHost + '/auth/oauth2/callback',
userInfoURL: argv.oauth2_UserInfoURL
}, (accessToken, refreshToken, params, profile, cb) ->