UNPKG

whodis-react-storage-browser

Version:

React hooks and components for secure, best practices authentication in seconds

12 lines (11 loc) 431 B
/** * internal use only * * gets the token from storage * - on client side rendering, gets the anti-csrf-token from local storage and checks it is still in sync w/ the token in the cookie * - on server side rendering, gets the token from exposed cookies * * WARNING: * - on server side this _does_ expose the raw JWT - and care must be taken not to log it */ export declare const getTokenFromStorage: () => string | null;