UNPKG

whodis-react-storage-browser

Version:

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

12 lines (11 loc) 621 B
/** * tactic: load anti-csrf-token defined in query params, if needed * context: * - some auth methods, e.g. oidc redirect, return the anti-csrf-token via query params rather than in the body of a payload * - in these situations, we must load the anti-csrf-token into local storage before attempting to use it * strategy: * - detect whether an anti-csrf-token was returned via query params * - load the token from query params into local storage if needed * - replace the url history to cleanup the url and prevent endless invocation */ export declare const loadAntiCsrfTokenFromQueryParamsIfNeeded: () => void;