import type { AuthOptionsCookie, RedirectOptions } from '../shared.js'; export interface AuthSecretConfig { client_id: string | number; client_secret: string; grant_type: 'password' | 'authorization_code'; } export interface ProfileResponse { profile: Record; strategyName: string; token: string; } export interface AuthResponse { token: string; expires: string; refresh_token: string; } export type PassportFetchOption = { url: string; method: string; alias?: string; }; export type TwoFactorFetchOption = PassportFetchOption & { property?: string; expires?: string; headerName?: string; }; type EndpointsOptions = { login: PassportFetchOption; user: { url: string; method: string; property?: string; }; twoFactor?: TwoFactorFetchOption; refresh?: PassportFetchOption; logout?: { alias?: string; }; }; export type PassportStrategiesOptions = { endpoints: EndpointsOptions; redirect: RedirectOptions; }; type AuthOptionsStrategies = { [key: string]: PassportStrategiesOptions; }; export interface PassportModuleOptions { csrf?: string; provider: 'passport'; cookie?: AuthOptionsCookie; strategies: AuthOptionsStrategies; } export {};