Bug report
Describe the bug
When minimum_password_length is set to a high value (e.g. 100) in config.toml, signInWithOtp fails with a 422 error:
{"code":422,"error_code":"weak_password","msg":"Password should be at least 100 characters.","weak_password":{"reasons":["length"]}}
OTP signup is passwordless — no password is supplied by the client. It appears that GoTrue internally generates a dummy password when creating the user account, but that generated password doesn't respect the minimum_password_length setting. It then validates the password it just generated against the config and rejects it.
To reproduce
- Set
minimum_password_length = 100 in config.toml under [auth]
- Enable OTP/magic link signup (
enable_signup = true under [auth.email])
- Call
supabase.auth.signInWithOtp({ email: "test@example.com" })
- Get 422
Unprocessable Entity error
Expected behavior
OTP signup should work regardless of minimum_password_length, since no password is involved. The internally generated dummy password should either bypass the length check or be generated to match the configured minimum.
System information
- Local Supabase CLI
- OTP / magic link auth flow
Bug report
Describe the bug
When
minimum_password_lengthis set to a high value (e.g. 100) inconfig.toml,signInWithOtpfails with a 422 error:{"code":422,"error_code":"weak_password","msg":"Password should be at least 100 characters.","weak_password":{"reasons":["length"]}}OTP signup is passwordless — no password is supplied by the client. It appears that GoTrue internally generates a dummy password when creating the user account, but that generated password doesn't respect the
minimum_password_lengthsetting. It then validates the password it just generated against the config and rejects it.To reproduce
minimum_password_length = 100inconfig.tomlunder[auth]enable_signup = trueunder[auth.email])supabase.auth.signInWithOtp({ email: "test@example.com" })Unprocessable EntityerrorExpected behavior
OTP signup should work regardless of
minimum_password_length, since no password is involved. The internally generated dummy password should either bypass the length check or be generated to match the configured minimum.System information