UNPKG

@proveanything/smartlinks-auth-ui

Version:

Lightweight React authentication UI components with bearer token support and Smartlinks SDK integration

27 lines 1.05 kB
import type { AuthToken, AuthUser } from '../types'; /** * Token Storage Layer * * Manages authentication tokens, user data, and account data using * the persistent storage layer (IndexedDB + localStorage fallback). * All methods are async to support IndexedDB operations. */ export declare const tokenStorage: { saveToken(token: string, expiresAt?: number): Promise<void>; getToken(): Promise<AuthToken | null>; clearToken(): Promise<void>; saveUser(user: AuthUser): Promise<void>; getUser(): Promise<AuthUser | null>; clearUser(): Promise<void>; clearAll(): Promise<void>; saveAccountData(data: Record<string, any>): Promise<void>; getAccountData(): Promise<Record<string, any> | null>; clearAccountData(): Promise<void>; saveAccountInfo(accountInfo: Record<string, any>, ttl?: number): Promise<void>; getAccountInfo(): Promise<{ data: Record<string, any>; isStale: boolean; } | null>; clearAccountInfo(): Promise<void>; }; //# sourceMappingURL=tokenStorage.d.ts.map