-
Notifications
You must be signed in to change notification settings - Fork 90
Refresh tokens and keeping tokens alive #14
Comments
I added a sample for generating refreshed tokens in #16 |
i am new in token. can i ask a question? when will i send a request to RefreshPath? |
@anhlee24 That's up to you. You can calculate it by adding expiration time to current time. |
@MihaMarkic you mean that if i set the expiration time by 30m. So i will setup the Client (SPA) to send a request to RefreshPath to keep it alive after 30m? |
@anhlee24 Yes, but more likely slightly before expiration, like after 29m or something :) |
Thank you so much! |
@MihaMarkic The response header contain: "Bearer error="invalid_token", error_description="The token is expired", but i don't know how to handle this error. |
@anhlee24 Could it be that your token has actually expired? You have to request the refresh before it expires. |
@MihaMarkic |
@anhlee24 On client side you should catch Unauthorized response after each request and redirect app to login page somehow. This is really up to the client implementation. |
@MihaMarkic Thank you so much :). |
What is the best way to implement refresh tokens using this approach? Thanks in advance.
The text was updated successfully, but these errors were encountered: