reactjs - Redux Keep Session -
redux's state goes away after refresh. keeping usertoken
object inside global user
object. since session should persist after refresh, assume there's better place store token
.
what's conventional way redux
manage sessions? , in case, should keep token
?
previous answered suggested use localstorage keep tokens, i'd advise against localstorage reliable store.
there's multiples cases making localstorage improper store important data. notably, there's space quota , browsers turn off in private browsing.
as token needs accompany each logged request server, want cookie.
Comments
Post a Comment