unkey
unkey copied to clipboard
No validation for Expiration date in Settings page
Preliminary Checks
-
[X] I have reviewed the documentation: https://unkey.dev/docs
-
[X] I have searched for existing issues: https://github.com/unkeyed/unkey/issues
-
[X] This issue is not a question, general help request, or anything other than a bug report directly related to Unkey. Please ask questions in our Discord community: https://unkey.dev/discord.
Reproduction / Replay Link (Optional)
No response
Description
The Expiration field on the Settings page currently accepts the ISO format date.
If the user adds an invalid date, there is no validation, it just shows a weird error toast with no context:
In my opinion, we can do a few things, my suggestions:
- Use a date picker instead of a text field for date input.
- Not sure, but validation for past date? Can expiration be set to past date?
- An expire now button? To expire key at this very time?
- If we gonna use text input with iso format, maybe a validation to notify the user?
Environment
No response
@perkinsjr , @chronark , I can work on this issue, if assigned :).
Just want your confirmation for a list of things, that we can do. Maybe few more suggestions?
yeah sgtm expiration in the past may make sense to immediately invalidate the key, although we want to make a feature on its own soon. so we don't need an "expire now" button, but a datetime picker would be nice indeed