gotrue: User created via `supabase.auth.admin.createUser` cannot login via OAuth

Bug report

User created via supabase.auth.admin.createUser cannot login via OAuth

To Reproduce

  • Create a new user within an edge function on the server using supabase.auth.admin.createUser
  • Logout and then try and login on client using client.auth.signInWithOAuth with google as the provider
  • The application doesn’t seem to recognise a user with that email exists and attempts to create a new user which causes an error message “Database error saving new user”

Expected behavior

  • The user should be logged in

Additional context

  • The user can login as expected if you send a magic link
  • Login with OAuth still doesn’t work after email is verified via login with magic link
  • Passing email_confirm: true to the original auth.admin function doesn’t solve the problem

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 16 (6 by maintainers)

Most upvoted comments

@carlosdp yes, you are right. We still haven’t deployed the fix to production yet but will look to do it in the upcoming week.

@d-e-h-i-o can you please reach out to us at https://app.supabase.com/support/new so we can investigate the issue with your project?

Hey @d-e-h-i-o ,

The fix has been rolled out partially, will update you again once it’s been fully rolled out. If you’re in a rush, feel free to email support with your project ref and we’ll let you know if your project has received the patch

@timdiacon @muhammadzadeh See #11413 that maybe can help you with your problem.