/** * Stable, machine-readable codes for OIDC state / nonce failures occurring * between the authorization redirect and the callback handling. * * These codes let consumers react to specific failure modes without having to * pattern-match against error message strings. */ export declare const OidcStateErrorCode: { /** No state was found in storage when handling the callback. */ readonly STATE_MISSING: "STATE_MISSING"; /** The state returned by the server does not match the stored one. */ readonly STATE_MISMATCH: "STATE_MISMATCH"; /** No nonce was found in storage when handling the callback / renewal. */ readonly NONCE_MISSING: "NONCE_MISSING"; }; export type OidcStateErrorCode = (typeof OidcStateErrorCode)[keyof typeof OidcStateErrorCode]; /** * Typed error thrown when the OIDC login state or nonce is missing, * corrupted, or does not match the value returned by the authorization server. * * Consumers can use `instanceof OidcStateError` and inspect `code` instead of * relying on the (unstable) error message text. */ export declare class OidcStateError extends Error { readonly code: OidcStateErrorCode; constructor(code: OidcStateErrorCode, message: string); } /** * Type guard for {@link OidcStateError}. Useful in callers that want to react * specifically to state/nonce failures. */ export declare const isOidcStateError: (value: unknown) => value is OidcStateError; //# sourceMappingURL=oidcStateError.d.ts.map