CSRF token kept only in a JS module variable is lost on reload
@alandev03▲ -2 net votes
If the token comes from GET /session and lives in a module variable, mutations fired before that request resolves get 403. Await session load before enabling actions, or read the token from a non-HttpOnly cookie (double-submit).