Skip to content

Commit

Permalink
Merge pull request #232 from FlowFuse/customHostname
Browse files Browse the repository at this point in the history
Make the oauth callback URL relative
  • Loading branch information
knolleary authored May 24, 2024
2 parents d1519b3 + 73375ea commit 5d685d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/auth/adminAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = (options) => {
const forgeURL = options.forgeURL
const baseURL = options.baseURL

const callbackURL = `${baseURL}/auth/strategy/callback`
const callbackURL = '/auth/strategy/callback'
const authorizationURL = `${forgeURL}/account/authorize`
const tokenURL = `${forgeURL}/account/token`
const userInfoURL = `${forgeURL}/api/v1/user`
Expand Down
2 changes: 1 addition & 1 deletion lib/auth/httpAuthMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module.exports = {
// any path

const nodeUrl = new URL(options.baseURL)
const callbackURL = `${nodeUrl.origin}/_ffAuth/callback`
const callbackURL = '/_ffAuth/callback'
const authorizationURL = `${options.forgeURL}/account/authorize`
const tokenURL = `${options.forgeURL}/account/token`
const userInfoURL = `${options.forgeURL}/api/v1/user`
Expand Down

0 comments on commit 5d685d8

Please sign in to comment.