Auth State in React with localStorage
Note: using localStorage for auth state is controversial. However, in a stateless API environment that does not use HttpOnly cookies, options are very limited. If you go this route, make sure you understand the risk of a cross site scripting attack.
...
djscruggs.hashnode.dev8 min read