fix: 为失效 OIDC 事务提供安全重试
细分回调事务、状态和授权响应错误,提供脱敏诊断编号与显式重新登录入口,避免失效事务形成重试循环。
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user