firebase / firebase/firebase-js-sdk
Documentation: Firebase documentation is not mentioning error code `auth/requires-recent-login` for `verifyBeforeUpdateEmail`
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 37
Description
# 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:
```javascript
firebase
.auth()
.currentUser.verifyBeforeUpdateEmail(email)
.then(() => {
// success
})
.catch(error => {
// error.code 'auth/requires-recent-login'
});
```

Contributor guide
Research direction
Open the linked Firebase User reference for verifyBeforeUpdateEmail and compare its documented errors and operation guidance with the reported behavior. Confirm the page explains auth/requires-recent-login and identifies the method as a sensitive operation; the documentation is done when both details are present and accurate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- firebase, javascript
- Domain
- authentication, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100