Short answer
If the sign-in form is for existing users only, keep shouldCreateUser false and show a neutral message such as “If an account exists, a code is on its way.” If new users should be able to sign up with a code, remove shouldCreateUser: false. Check that the email the user typed matches the one on the account.
Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.
Why Supabase refuses the code, and the fix
01
shouldCreateUser is false and the user is new
“set this to false if you do not want the user to be automatically signed up” Supabase docs, Passwordless email logins (code sample)
The option stops signInWithOtp from creating accounts. A new email then gets this code instead of a magic link.
const { error } = await supabase.auth.signInWithOtp({ email, options: { shouldCreateUser: false }, }); if (error?.code === 'otp_disabled') { showMessage('If an account exists for this email, a sign-in link is on its way.'); }02
The user typed a different email
A typo, a second address, or a badly formatted email or phone number all look like a missing account; with shouldCreateUser false, the invalid-format case returns this same message. Show the email back on the screen and let the user correct it.
03
The message reveals who has an account
Showing “no account found” lets anyone test which emails are registered. Use the same message for both cases on public forms.
04
Magic links are turned off
“Sign in with OTPs (magic link, email OTP) is disabled.” Supabase docs, Auth error codes (otp_disabled)
Also check: if the Email provider or magic links are disabled, the current Auth server returns email_provider_disabled for an existing user or when shouldCreateUser is true. A new user with shouldCreateUser false still gets otp_disabled first. The docs describe otp_disabled as OTP sign-in being disabled, so check both settings.
Checked against the vendor’s docs on : Supabase docs: Auth error codes; Supabase docs: Passwordless email logins; Supabase Auth source: otp.go (Signups not allowed for otp).
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
Related: Supabase signups not allowed (signup_disabled) · Supabase email link invalid or expired · Supabase mfa_verification_failed · Supabase OAuth provider disabled