Adding Email to user with updateUser() always triggers Email confirmation, even when disabled.

Open
#1,979 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

Start with the updateUser({ email }) flow described in the reproduction steps and trace how the disabled Email Auth Provider setting is handled after phone OTP verification. Reproduce the issue with the listed Phone and Email Auth Provider setup; done means updating the email does not send a confirmation email when confirmation is disabled.

Written by the indexing model from the issue text.

Description

bug

I have a sign-up/sign-in flow with SMS OTP, and after signup the user can add their email as well.
I have disabled Email confirmation in the Email Auth Provider, but as soon as i call updateUser with the email, i receive an email to confirm this.

await supabase.auth.updateUser({ email: email });

Image

To Reproduce

  1. Setup Phone Auth provider with Twilio
  2. Email Auth Provider with confirmation disabled
  3. Call await supabase.auth.signInWithOtp({ phone: phone })
  4. Call await supabase.auth.verifyOtp({ phone: phone, token: verificationCode, type: 'sms' }) with received auth code
  5. Call await supabase.auth.updateUser({ email: email }); with your email.
  6. See that you receive email about confirming your email address, even though it is set as disabled.
Dominant language
Go
Stars
2.6k
Forks
764
Avg merge
5d 3h
Merged PRs (30d)
39

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/auth

All issues in supabase/auth

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.