import { type CanActivateFn } from '@angular/router'; /** * Social redirect callback route guard. * * This guard supports the redirect-first social flow where the backend redirects * back to the frontend with: * - `appState` (always optional) * - `exchangeToken` (present for json/hybrid flows, and for cookie flows that return a challenge) * - `error` / `error_description` (provider errors) * * Behavior: * - If `exchangeToken` exists: exchanges it via backend (SDK handles navigation automatically). * - If no `exchangeToken`: treat as cookie-success path (SDK handles navigation automatically). * - If `error` exists: redirects to oauthError route. * - If auto-redirect is disabled (redirectUrls set to null): returns true to activate the route. * * @example * ```typescript * import { socialRedirectCallbackGuard } from '@nauth-toolkit/client/angular'; * * export const routes: Routes = [ * { path: 'auth/callback', canActivate: [socialRedirectCallbackGuard], component: CallbackComponent }, * ]; * ``` */ export declare const socialRedirectCallbackGuard: CanActivateFn;