Giter VIP home page Giter VIP logo

Comments (4)

kiwicopple avatar kiwicopple commented on August 15, 2024

PR here: #58

from gotrue-js.

m0ast avatar m0ast commented on August 15, 2024

Hello, maybe this isn't an issue anymore but after looking around I've found that gotrue reset new_email to '' only after confirmation, which is then omitted on serialization.
Also maybe this is expected behavior as unconfirmed email doesn't seem to enable sign-in?

from gotrue-js.

markwcollins avatar markwcollins commented on August 15, 2024

Hi all! I don't suppose there is any progress on this one? I noticed there were a few conflicts on the PR #58 which was from a while back. Ideally, I've love to be able to update the user's email directly without using the new_email field which I think requires the user to validate before it gets added as the user's actual email. Thanks!

from gotrue-js.

kangmingtay avatar kangmingtay commented on August 15, 2024

Hey everyone, updating a user's email requires at least a single confirmation from the user. The typical flow is as follows:

  1. User logs in
  2. User updates email via PUT /user
  3. Gotrue sends a confirm email change link to the new_email
  4. User clicks on confirm email change link by logging into the new_email address provided

The new_email field indicates the email that the user wants to update to. Maybe we should consider renaming it if it seems confusing.

Ideally, I've love to be able to update the user's email directly without using the new_email field which I think requires the user to validate before it gets added as the user's actual email.

@markwcollins user validation is a necessary security feature for email updates. A malicious user can potentially call the email update endpoint, change the user's email to theirs and perform a password reset action which sends a password reset link to the update email address.

Closing this for now but feel free to reopen it if i've misunderstood the issue.

from gotrue-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.