From 88b0e2b825c240c63c9c629b84e9fae947cddf1e Mon Sep 17 00:00:00 2001 From: Paul Rodwell Date: Thu, 4 Nov 2021 10:12:59 +0000 Subject: [PATCH] callbackURL has fix location, rather than being a parameter. --- docs/config-oauth2.md | 1 - server/social.coffee | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/config-oauth2.md b/docs/config-oauth2.md index 595cd2a..9bb94c8 100644 --- a/docs/config-oauth2.md +++ b/docs/config-oauth2.md @@ -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" } ``` diff --git a/server/social.coffee b/server/social.coffee index 2b56754..0ce6eb4 100644 --- a/server/social.coffee +++ b/server/social.coffee @@ -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) ->