@getpassage/react-native
Version:
Passage React Native SDK for mobile authentication
32 lines (31 loc) • 822 B
TypeScript
export interface DecodedJWT {
sessionId?: string;
record?: boolean;
debug?: boolean;
clearCookies?: boolean;
[key: string]: any;
}
/**
* Decode a JWT token and extract its payload
*/
export declare function decodeJWT(token: string): DecodedJWT | null;
/**
* Extract session ID from JWT token
*/
export declare function extractSessionId(token: string): string | null;
/**
* Extract record flag from JWT token
*/
export declare function extractRecordFlag(token: string): boolean;
/**
* Extract debug flag from JWT token
*/
export declare function extractDebugFlag(token: string): boolean;
/**
* Extract clearCookies flag from JWT token
*/
export declare function extractClearCookiesFlag(token: string): boolean;
/**
* Clear cached token data
*/
export declare function clearJWTCache(): void;