You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The time units, more specifically, the access-token and refresh-token units differ, the former being in "seconds" and the latter in "days". Using different scales or time measurements for something that perhaps should or could be standardized.
Describe what you'd like Logto to have
I propose either to adapt a standardized unit of time, such as the seconds used in the access token, or, as a more complex alternative, to leave the validation only of integers and add formatting to the values using day, hour, minute, second, for example, that the end user enters in the Logto console "1d12h30m30s" equivalent in an integer value to 131430 seconds.
The text was updated successfully, but these errors were encountered:
ggomarighetti
changed the title
feature request:
feature request: standardize time units
Jul 12, 2024
Hello, I think the time format has another issue, i.e, created_at, updated_at in JWT claims use milliseconds, while exp, iat use seconds, which would confuse user when deal cases such as membership expiration logic.
Evidence:
It would be better if we could unify all time format (either in seconds or in milliseconds). I guess this would need some kind of production data migration work right? Not as easy as it may look like.
I was not referring to the exact value that is reflected in the tokens, but rather, that in the use of the platform (at least by user-interface) to refer to the expiration date of the accessTokens is asked to enter seconds (or minutes, I do not remember well) and for the refreshToken is asked to enter days as an integer, being that both are expressed as seconds or milliseconds in their respective claims, and as there can be tokens that last 5 minutes as well as others that last 1 year, it seems to me that using a format like the one proposed in the inputs (at least in the frontend) for the users to express the time and then apply a utility to convert it to seconds or milliseconds, would be ideal or more convenient.
What problem did you meet?
The time units, more specifically, the access-token and refresh-token units differ, the former being in "seconds" and the latter in "days". Using different scales or time measurements for something that perhaps should or could be standardized.
Describe what you'd like Logto to have
I propose either to adapt a standardized unit of time, such as the seconds used in the access token, or, as a more complex alternative, to leave the validation only of integers and add formatting to the values using day, hour, minute, second, for example, that the end user enters in the Logto console "1d12h30m30s" equivalent in an integer value to 131430 seconds.
The text was updated successfully, but these errors were encountered: