created_at timestamp in OAuth2 refresh_token response #7257
Replies: 4 comments
-
Contributions welcome! |
Beta Was this translation helpful? Give feedback.
-
I could tackle it, but I would like to clear some points: The current response from the Token Endpoint looks like:
The IMO, what would be more useful: add a config field to set the expiration time for the refresh token. WDYT? |
Beta Was this translation helpful? Give feedback.
-
Sorry if my initial summary confused things up. In order to ask for a refreshed access_token one would make an api call using the refresh_token within the 'expires_in' time limit but to be precise if an attribute called 'created_at' was also added to this same response it would be more accurate to ask for a new access_token using both created_at and expires_in fields. What I am trying to get as is relying on the application system time may add a few seconds of delay and so a time reference (created_at) would be helpful to make better use of the expires_in attribute (One could also argue that the refresh call can be made preemptively well ahead of the expires_in time to compensate for any delays caused while generating the tokens) |
Beta Was this translation helpful? Give feedback.
-
Ok, for custom TTLs in refresh tokens there is already an issue (#2024). The Besides, I don't think it's a biggie to try getting a new access token with a expired refresh token. You will simply get a error message, which means the refresh token isn't valid and you have to authenticate again. It's only one call. |
Beta Was this translation helpful? Give feedback.
-
Summary
It would be great if we can get the 'created_at' or 'refreshed_at' timestamp in the OAuth refresh_token response as well. We currently see the 'created_at' attribute only in the initial OAuth token creation response Having this attribute will be useful to enforce the 'expires_in' attribute properly.
Beta Was this translation helpful? Give feedback.
All reactions