question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

verifyBeforeUpdateEmail

See original GitHub issue

Feature request

Is your feature request related to a problem? Please describe.

User creates an account using a magic link. For some reason user wants to update their email address on the account. At this point there is no way to do it as far as I know

Describe the solution you’d like

It would be great to have an updateEmail method (maybe similar to resetPasswordForEmail) where verification email is sent to a new requested email address. After the new email is verified, the old email is replaced with the new one.

Describe alternatives you’ve considered

At the moment user could change their email directly without confirmation, but this is not ideal, because they might make a mistake, and if they log out, they would loose their access to account, as now their account is associated with wrong email. So magic links are sent to nowhere.

Additional context

Firebase has a similar feature verifyBeforeUpdateEmail().

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
i-pipcommented, Jun 9, 2021

Hi @edgarasben So regarding customizing the email template, I had a look under Authentication/Templates in the Supabase dashboard and at first it appeared that only “Confirm Signup”, “Reset Password”, “Magic Link” and “Invite User” were customizable but then I looked at the http request made by changing any of these and noticed MAILER_TEMPLATES_EMAIL_CHANGE_CONTENT amongst MAILER_TEMPLATES_MAGIC_LINK_CONTENT and the others from above.

So although it’s not implemented in the Supabase dashboard, the api for it already is in place - just a matter of implementing it in the dashboard I guess - the dashboard isn’t open sourced yet but @kiwicopple mentioned that they’re working on opening it up in future though. I wouldn’t be surprised to see it popup very soon considering the speed at which the Supabase team is building

1reaction
edgarasbencommented, Jun 9, 2021

Thanks for looking into that! Sending templates through API is even more useful in some cases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to verify an email before making it the primary (Firebase ...
You can do it via verifyBeforeUpdateEmail. firebase.auth().currentUser.verifyBeforeUpdateEmail('newEmail@example.com') .then(function() ...
Read more >
User | JavaScript SDK | Firebase JavaScript API reference
verifyBeforeUpdateEmail ( newEmail : string , actionCodeSettings ? ... verifyBeforeUpdateEmail( 'user@example.com', actionCodeSettings) .then(function() ...
Read more >
[firebase_auth] verifyBeforeUpdateEmail() method does not ...
verifyBeforeUpdateEmail () method to update a user's email address, the bool value for FirebaseAuth.instance.currentUser.emailVerified should be ...
Read more >
Working with multi-factor users - Identity Platform - Google Cloud
To update a user's email, use the verifyBeforeUpdateEmail() method. Unlike updateEmail() , this method requires the user to follow a verification link ...
Read more >
User | React Native Firebase
verifyBeforeUpdateEmail. </>. Sends a link to the user's email address, when clicked, the user's Authentication email address will be updated to whatever ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found