Skip to content

Commit

Permalink
Fixed SSO callback URL
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueWinter committed Jan 1, 2025
1 parent 32fe085 commit eaac705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/routes/#.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default async function loginRouter(sso?: NormalizedConfig['sso']) {
const decrypted: SsoCookie = JSON.parse(decrypt(encrypted, secret, iv));
res.clearCookie('sso');

const url = new URL(`${req.protocol}://${req.get('host')}${req.originalUrl}`);
const url = new URL(req.originalUrl, sso.callbackUrl);
// Some SSO servers include the state parameter even if the original request didn't have it
if (!url.searchParams.get('state')) {
url.searchParams.delete('state');
Expand Down

0 comments on commit eaac705

Please # to comment.