-
-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return expiring date after Login #131
Comments
Could you elaborate a bit more? What would be the usecase exactly? What kind of validation should be done on a freshly generated token? Thanks! |
I see a use case where you have a long running client application that is desired to auto refresh it's tokens as long as the user is active (uses mouse, clicks etc) but does not necessarily interact with the backend. |
@belugame: that's a valid use case indeed. I think we could simply setup a refresh token expiry endpoint that makes use of the auto-refresh feature behind the scene by forcing a refresh and return a simple payload like:
We then could also add this in the payload returned by the login view. If everybody agrees I'm up to implement it in the coming days 😉 |
sounds good to me, go for it :) |
The use case @belugame described is what i was thinking of: Long running client application, that know when the token is going to expire and can refresh it, or redirect the user to the login page. The main idea was to get the expiring datetime together with the token. |
@VolkerSchiewe: great! it aligns with what I plan to do. I hope to have some time soon to get my hands on this 👍 |
Hey @johnraz is this feauture coming soon? |
It’s still on my radar yes but I can’t give you a specific ETA. |
@VolkerSchiewe @abdelwahebmoalla just letting you know PR #152 aims to solve what you guys are looking for :) |
…etime-after-login fixes #131 -- return expiry date on successful login
…tion-datetime-after-login fixes jazzband#131 -- return expiry date on successful login
Is there a reason why only the user is returned along with the token and not also the expiring date or the expiring time-delta?
It could be very helpful to have this information to validate tokens in the frontend before using them.
The text was updated successfully, but these errors were encountered: