Closed kubitre closed 5 years ago
you should call the function IsAuthentificatedLS:
return {...state, isAuthentificated: IsAuthentificatedLS()}
For the maintain security, it would be nice to also validate the token on the server side in order to exclude the possibility of token substitution. Therefore, we should add function for send LS token to backend and response validation status of our information use for set to state Auth
https://github.com/kostya05983/web-bomber/blob/5be7f1500f274db0dfc6a98a6a7e461fc0ea11e9/src/store/Auth/reducer.js#L26
There is you should add checking auth token in localstorage such as like this: