mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-04 00:20:45 +00:00
fix: oidc errors again (#2853)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
Notify HeyPuter / notify (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
Notify HeyPuter / notify (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
This commit is contained in:
@@ -68,13 +68,13 @@ const OIDC_ERROR_REDIRECT_MAP = {
|
||||
function buildOIDCErrorRedirectUrl (sourceFlow, errorCondition, message, stateDecoded) {
|
||||
const targetFlow = OIDC_ERROR_REDIRECT_MAP[sourceFlow]?.[errorCondition] ?? sourceFlow;
|
||||
const origin = (config.origin || '').replace(/\/$/, '') || '/';
|
||||
const params = new URLSearchParams({ action: targetFlow, auth_error: '1', message: message === 'This account is suspended.' ? message : 'Unauthorized' });
|
||||
const params = new URLSearchParams({ action: targetFlow, auth_error: '1', message: message === 'This account is suspended.' ? 'account_suspended' : 'unauthorized' });
|
||||
if ( stateDecoded?.embedded_in_popup && stateDecoded?.msg_id != null ) {
|
||||
const popupParams = new URLSearchParams({
|
||||
embedded_in_popup: 'true',
|
||||
msg_id: String(stateDecoded.msg_id),
|
||||
auth_error: '1',
|
||||
message: message === 'This account is suspended.' ? message : 'Unauthorized',
|
||||
message: message === 'This account is suspended.' ? 'account_suspended' : 'unauthorized',
|
||||
action: targetFlow,
|
||||
});
|
||||
if ( stateDecoded?.opener_origin ) {
|
||||
|
||||
Reference in New Issue
Block a user