/** * SSORedirectGuard — Checks for SSO cookie and redirects to login origin * for token relay if the current origin doesn't have local tokens. * * This component should be rendered in route guards (ProtectedRoute, * LandingOrDashboardRedirect) to enable cross-domain SSO. * * Works in all environments (local dev, alpha, production): * - Local dev: cookie on .local.burdenoff.com shared domain * - Production: cookie on current domain (redirect-based relay) * * @module @burdenoff/fe-libs/shared/components/SSORedirectGuard */ export declare function clearSSORelayAttempt(): void; export declare function shouldSkipSSORedirect(returnPath?: string): boolean; export declare function hasRecentSSORedirectAttempt(relayOrigin: string, returnTo: string): boolean; export declare function markSSORedirectAttempt(relayOrigin: string, returnTo: string): void; export declare function getSSORedirectUrl(returnPath?: string): string | null; /** * Check if Single Logout (SLO) has occurred on another shell. * * If the bf-sso cookie is ABSENT but localStorage has auth tokens, * it means another shell cleared the shared cookie (logged out). * This function clears local tokens and returns true so the caller * can redirect to the login page. * * Call this in ProtectedRoute BEFORE checking local tokens. */ export declare function checkSLO(): boolean; /** * Check if the current access token is still valid by making a lightweight * GraphQL query. If the server rejects it (401/UNAUTHENTICATED), the session * was invalidated (SLO from another domain) → clear local state. * * This enables SLO across different eTLD+1 domains (production). * Called once on page load from ProtectedRoute. * * Returns a Promise that resolves to true if session is invalid (SLO occurred). */ export declare function checkRemoteSLO(gatewayUrl: string, accessToken: string): Promise; /** * Clear all local auth state (used by both checkSLO and checkRemoteSLO). */ export declare function clearLocalAuthState(): void; /** * React component that renders a spinner while redirecting. * Use this as the return value when getSSORedirectUrl() returns a URL. */ export declare function SSORedirectSpinner(): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=SSORedirectGuard.d.ts.map