Skip to content

Documentation: Firebase documentation is not mentioning error code auth/requires-recent-login for verifyBeforeUpdateEmail #5202

@victorfrederiknielsen

Description

@victorfrederiknielsen

Describe your environment

  • Operating System version: OSX Big Sur 11.2.3
  • Browser version: Chrome Version 91.0.4472.164 (Official Build) (x86_64)
  • Firebase SDK version: "firebase": "^8.2.4"
  • Firebase Product: Documentation

Describe the problem

Firebase documentation is not mentioning error code auth/requires-recent-login for verifyBeforeUpdateEmail and does not mention verifyBeforeUpdateEmail being a sensitive operation.

Link to docs:
https://firebase.google.com/docs/reference/js/firebase.User#verifybeforeupdateemail

Steps to reproduce:

  • Authenticate with firebase (Email/password)
  • Wait until you're not longer recently authenticated.
  • Run firebase.auth().currentUser.verifyBeforeUpdateEmail(email)
  • Error.code is auth/requires-recent-login

Relevant Code:

          firebase
            .auth()
            .currentUser.verifyBeforeUpdateEmail(email)
            .then(() => {
              // success
            })
            .catch(error => {
              // error.code 'auth/requires-recent-login'
            });

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions