Learning angular2.
From the login page of the angular app
1) Request to log in to the server and get a token back.
2) Save token to cookies or local storage.
3) When accessing a page that requires authentication, if there is no token or if the token is not valid in the api communication return, go to the login page.
Is this how it works to log in from angular?
angular login session
In my case, I give a refreshing token.
If the token expires, we sent the refresh_token value again to check the refresh_token value and update the token immediately.
That is, when you go to the login page,
In the case of these three, I think they tried to log in again.
© 2024 OneMinuteCode. All rights reserved.