I have a question about secure authorization in reactjs. I'm currently using a key stored in local storage, but my backend only validates that key when the request is sent, so the user can navigate through the pages until they submit a form or request some data. Also, I'm not sure about local storage (I think it's not the best way to store tokens/api keys)
Can you give me some advice on this or a link where I can get some useful information about this without using firebase and etc.?
Thanks in advance!
UPD: Im checking if key exists in App.js and deleting key from localstorage if server return 401