Skip to content

fix(otp): dummy signup password must satisfy minimum_password_length (fixes #2456) - #2717

Open
deepshekhardas wants to merge 1 commit into
supabase:masterfrom
deepshekhardas:fix/2456-otp-signup-min-length
Open

fix(otp): dummy signup password must satisfy minimum_password_length (fixes #2456)#2717
deepshekhardas wants to merge 1 commit into
supabase:masterfrom
deepshekhardas:fix/2456-otp-signup-min-length

Conversation

@deepshekhardas

Copy link
Copy Markdown

fix(otp): dummy signup password must satisfy minimum_password_length (fixes #2456)

OTP/magic-link signup creates the user with an internally generated
dummy password of fixed length (33 for email magic link, 64 for SMS).
When minimum_password_length is configured higher than that (e.g.
100), validateSignupParams rejects the just-generated password with
weak_password 422, breaking passwordless signup entirely.

Generate the dummy password with
max(config.Password.MinLength, <default>) so passwordless signup works
regardless of the configured minimum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OTP signup fails with 422 when minimum_password_length is high

1 participant