UNPKG

react-cookie-auth

Version:

Authentication library with HTTP-only cookies and Page Visibility API for handling sleep/wake cycles

11 lines (10 loc) 558 B
/** * Custom hook for handling refresh token operations * * @param refreshTokenMutation The RTK Query mutation for refreshing tokens * @param refreshInterval How often to refresh the token (ms) * @param maxRetryAttempts Maximum number of retry attempts on failure * @param retryDelay Delay between retry attempts (ms) * @returns A function that handles token refresh logic */ export declare const useRefreshToken: (refreshTokenMutation: any, refreshInterval?: number, maxRetryAttempts?: number, retryDelay?: number) => () => Promise<void>;