Skip to content

Commit 255dde9

Browse files
authored
fix: oidc errors again (#2853)
1 parent 3b6ae2d commit 255dde9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/backend/src/routers/auth

src/backend/src/routers/auth/oidc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ const OIDC_ERROR_REDIRECT_MAP = {
6868
function buildOIDCErrorRedirectUrl (sourceFlow, errorCondition, message, stateDecoded) {
6969
const targetFlow = OIDC_ERROR_REDIRECT_MAP[sourceFlow]?.[errorCondition] ?? sourceFlow;
7070
const origin = (config.origin || '').replace(/\/$/, '') || '/';
71-
const params = new URLSearchParams({ action: targetFlow, auth_error: '1', message: message === 'This account is suspended.' ? message : 'Unauthorized' });
71+
const params = new URLSearchParams({ action: targetFlow, auth_error: '1', message: message === 'This account is suspended.' ? 'account_suspended' : 'unauthorized' });
7272
if ( stateDecoded?.embedded_in_popup && stateDecoded?.msg_id != null ) {
7373
const popupParams = new URLSearchParams({
7474
embedded_in_popup: 'true',
7575
msg_id: String(stateDecoded.msg_id),
7676
auth_error: '1',
77-
message: message === 'This account is suspended.' ? message : 'Unauthorized',
77+
message: message === 'This account is suspended.' ? 'account_suspended' : 'unauthorized',
7878
action: targetFlow,
7979
});
8080
if ( stateDecoded?.opener_origin ) {

0 commit comments

Comments
 (0)