© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•5mo ago•
27 replies
Tom

Can signInWithOtp lead to user_recovery_requested?

Hi! I have a general question regarding the signup/in flow of supabase, as I have experienced some things that I cannot fully understand using the docs.

My current situation is:
- I create users programmatically using an edge function
const { data: created, error: createErr } = await supabase.auth.admin.createUser({
    email,
    password: generatedPassword,
    user_metadata: { first_name: first, last_name: last, name },
    email_confirm: true
  })
const { data: created, error: createErr } = await supabase.auth.admin.createUser({
    email,
    password: generatedPassword,
    user_metadata: { first_name: first, last_name: last, name },
    email_confirm: true
  })

(Note: I tried both with/without password and with/without email_confirm, password makes no difference (I don't use it, only magic links), and not adding email_confirm does not work as actually confirming seems to be the last part of the signup flow and I want to keep signups blocked, that said I currently have signup enabled again for this instance for testing)

- After that, users should be able to sign in with the client-side call of
createClient().auth.signInWithOtp({
      email,
      options: {
        shouldCreateUser: false
      }
    });
createClient().auth.signInWithOtp({
      email,
      options: {
        shouldCreateUser: false
      }
    });

but for the programmatically generated user, I get "Email Address is Invalid" with the action being "user_recovery_requested".

Some settings:
- Confirm email: disabled
- Allow new users to sign up: currently enabled (but should be disabled)
- Email (Provider): enabled

Signup works, "Confirmed at" is not null, "Invited at",
"Confirmation sent at" and "Last signed in" are null.

I am unsure why "user_recovery_requested" is triggered by signInWithOtp in the first place and why I get the invalid email error message, maybe some of you understand the inner workings of supabase good enough to tell me :)

Thanks for your time!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

signinwithotp
SupabaseSSupabase / help-and-questions
3y ago
Unable to create new user accounts with signInWithOTP method
SupabaseSSupabase / help-and-questions
3y ago
signInWithOtp always redirects to localhost3000
SupabaseSSupabase / help-and-questions
4y ago
Is signInWithOtp() broken?
SupabaseSSupabase / help-and-questions
2mo ago