logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
8.15k stars 395 forks source link

feature request: standardize time units #6231

Open ggomarighetti opened 1 month ago

ggomarighetti commented 1 month ago

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.

wangsijie commented 1 month ago

Good suggestion! I'll discuss with the team.