Feature request for Supabase Auth: Allow the usage of more than just digits (lowercase and/or uppercase letters) in the one-time passwords #33744
Unanswered
maximilian-hammerl
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, Supabase Auth generates OTPs consisting only of 6 to 10 digits (function
GenerateOtp
in https://github.com/supabase/auth/blob/master/internal/crypto/crypto.go). While numeric OTPs are standard, adding support for alphanumeric OTPs (lowercase and/or uppercase letters) would improve security and flexibility.Proposed feature:
Introduce a configuration option allowing specifying the character set for OTPs, such as:
Use case:
Implementation:
Add an optional setting in the Supabase Auth configuration
config.Mailer.OtpCharset
and forward it to an adjusted version of theGenerateOtp
function.A not yet tested and probably too simple possible implementation:
Impact:
This would provide better security without significant implementation complexity and would make Supabase Auth more adaptable to different authentication policies.
I would also volunteer to implement this feature!
Beta Was this translation helpful? Give feedback.
All reactions