ory / kratos

The most scalable and customizable identity server on the market. Replace your Homegrown, Auth0, Okta, Firebase with better UX and DX. Has all the tablestakes: Passkeys, Social Sign In, Multi-Factor Auth, SMS, SAML, TOTP, and more. Written in Go, cloud native, headless, API-first. Available as a service on Ory Network and for self-hosters.
https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=kratos
Apache License 2.0
11.27k stars 964 forks source link

Request to make TOTP period configurable #3554

Open ehblh opened 1 year ago

ehblh commented 1 year ago

Preflight checklist

Ory Network Project

No response

Describe your problem

We have received user feedback indicating that some of our customers find it challenging to enter the TOTP code within the current 30-second window. This can lead to authentication failures and user frustration. We want to provide our users with a more comfortable authentication experience by extending the TOTP validity period to 60 seconds.

Describe your ideal solution

We propose adding a configuration option in Ory Kratos that allows administrators to specify the TOTP validity period. Ideally, this configuration parameter should be included in the Ory Kratos configuration file (e.g., kratos.yml) and accept values in seconds. This way, organizations can adapt the TOTP code expiration time to their specific security and usability requirements.

Workarounds or alternatives

Currently there is no workarounds because 30-second valid period is hard-coded in the code.

Version

v1.0.0

Additional Context

alnr commented 1 year ago

Is this really hardcoded to 30 sec? IMO we can just extend this to 5 min. @zepatrik ?

aeneasr commented 1 year ago

30 seconds is the default specified in the TOTP RFC (as well as industry standard) and it should not be changed without good reason.

alnr commented 1 year ago

Are we talking about the individual code validity period? Or the total time the user has to complete the flow?

Robert-Bosse commented 1 year ago

I think it is best practice while working with TOTP to not only accept the latest 6 digit token for validation but also the one that was valid before. So even if the code changes while the user is checking he can still use the old and the new one. @ehblh Would this help your users?

github-actions[bot] commented 1 week ago

Hello contributors!

I am marking this issue as stale as it has not received any engagement from the community or maintainers for a year. That does not imply that the issue has no merit! If you feel strongly about this issue

Throughout its lifetime, Ory has received over 10.000 issues and PRs. To sustain that growth, we need to prioritize and focus on issues that are important to the community. A good indication of importance, and thus priority, is activity on a topic.

Unfortunately, burnout has become a topic of concern amongst open-source projects.

It can lead to severe personal and health issues as well as opening catastrophic attack vectors.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone.

If this issue was marked as stale erroneously you can exempt it by adding the backlog label, assigning someone, or setting a milestone for it.

Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you!

Thank you 🙏✌️