I would like to ask you if my approach to authorization.
-
Create an array of logged User objects on server site:
{ username: string token: string }
-
After login success, token is being saved in Local Storage. Token must be unique.
- In every page, where access is restricted token would be send to server to check if such user is logged in. If yes - access will be granted.
What do you think about it?
via Michal Bialek
No comments:
Post a Comment