Skip to content

chore(docs): document how auth and user profile email are kept in sync #859

Open
@matchatype

Description

@matchatype

Updating user email is easy using firebase hooks. You just call firebase.updateEmail('[email protected]').

If you are storing user profiles you can pass a second argument to update the profile as well firebase.updateEmail('[email protected]', true).

However, what happens if the user change his/her mind, and clicks on the email link received from firebase auth? User's email address would be reset to the old one, and now firebase auth and firebase profile would be out of sync, the first one holding the old email address, and the last one the new email address.

I couldn't find an example covering the use case, and I'm not sure what to do. I could keep checking for auth.email to equal profile.email but that looks wasteful. Maybe there's a trigger for a background function to keep things synced on a reset event, however I couldn't really find one.

Any suggestion?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions