getCsrfToken
Retrieves the CSRF token from the backend server and stores it in session storage. Returns the token if successful, or null
if not.
Example
get-csrf-token.js
const token = await getCsrfToken();
Retrieves the CSRF token from the backend server and stores it in session storage. Returns the token if successful, or null
if not.
const token = await getCsrfToken();