Answer the question
In order to leave comments, you need to log in
What is the best way to implement temporary (1 hour) token persistence in react.js?
I'm trying to build an authorization system on the site (node.js + react.js)
A person after authorization, if the login and password match, receives a token that should be stored for an hour in all tabs.
There is an idea to save in localstorage, read the current date of saving and if the date is over an hour, then clear the token.
Further, a similar idea with Cookies, only without fraud with time.
But maybe there is another way, using React, to save the data?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question