mirror of
https://github.com/diced/zipline.git
synced 2025-04-11 23:31:17 -05:00
fix: oidc has a default oauth state
This commit is contained in:
parent
ec8e426964
commit
a4b55d102a
1 changed files with 2 additions and 1 deletions
|
@ -25,13 +25,14 @@ async function handler({ code, host, state }: OAuthQuery, _logger: Logger): Prom
|
|||
|
||||
if (!code) {
|
||||
const linkState = encrypt('link', config.core.secret);
|
||||
const defaultState = encrypt('default', config.core.secret);
|
||||
|
||||
return {
|
||||
redirect: oidcAuth.url(
|
||||
config.oauth.oidc.clientId!,
|
||||
`${config.core.returnHttpsUrls ? 'https' : 'http'}://${host}`,
|
||||
config.oauth.oidc.authorizeUrl!,
|
||||
state === 'link' ? linkState : undefined,
|
||||
state === 'link' ? linkState : defaultState,
|
||||
config.oauth.oidc.redirectUri ?? undefined,
|
||||
),
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue