fix(ui): drop OidcCallback ?local trap on login_required

This commit is contained in:
hsiegeln
2026-04-26 19:38:15 +02:00
parent 7565cdcf2f
commit b63b9aa4bb

View File

@@ -20,11 +20,6 @@ export function OidcCallback() {
const errorParam = params.get('error');
if (errorParam) {
// prompt=none failed — no session, fall back to login form
if (errorParam === 'login_required' || errorParam === 'interaction_required') {
window.location.replace(`${config.basePath}login?local`);
return;
}
// consent_required — retry without prompt=none so user can grant scopes
if (errorParam === 'consent_required' && !sessionStorage.getItem('oidc-consent-retry')) {
sessionStorage.setItem('oidc-consent-retry', '1');
@@ -43,7 +38,7 @@ export function OidcCallback() {
window.location.href = `${data.authorizationEndpoint}?${p}`;
}
}).catch(() => {
window.location.replace(`${config.basePath}login?local`);
useAuthStore.setState({ error: 'OIDC consent retry failed.', loading: false });
});
return;
}
@@ -77,7 +72,7 @@ export function OidcCallback() {
{error && (
<>
<Alert variant="error">{error}</Alert>
<Button variant="secondary" onClick={() => navigate('/login?local')} className={styles.backButton}>
<Button variant="secondary" onClick={() => navigate('/login')} className={styles.backButton}>
Back to Login
</Button>
</>