fix: 为失效 OIDC 事务提供安全重试

细分回调事务、状态和授权响应错误,提供脱敏诊断编号与显式重新登录入口,避免失效事务形成重试循环。
This commit is contained in:
2026-07-13 22:50:09 +08:00
parent 6e0a5fe397
commit 8ca68eb3cd
8 changed files with 314 additions and 15 deletions
@@ -0,0 +1,21 @@
import type { OIDCCallbackError } from '../lib/oidc';
import { Button } from './ui';
export function OIDCCallbackNotice(props: {
error: OIDCCallbackError;
onRetry: () => void;
}) {
return (
<div className="notice oidcCallbackNotice" role="alert">
<span className="oidcCallbackMessage">
<span>{props.error.message}</span>
{props.error.diagnosticId && <small>{props.error.diagnosticId}</small>}
</span>
{props.error.retryable && (
<Button type="button" variant="outline" size="sm" onClick={props.onRetry}>
</Button>
)}
</div>
);
}