firebase.auth().confirmPasswordReset() is throwing
the wrong error. Instead of auth/user-disabled, it
throws auth/invalid-action-code.
In Firefox 70.0.1, this error is thown:
{ code: "auth/invalid-action-code", message: "The action code is invalid. This can happen if the code is malformed, expired, or has already been used.", stack: "" }
instead of this more relevant error that is thrown in Chrome 78.0.3904.108:
{ code: "auth/user-disabled", message: "The user account has been disabled by an administrator." }
The latter error is more relevant because the action code is
valid, current, and unused, the problem is that the user is
disabled and it would be nice if this was reflected in the error
message.
currentUser object value:
null
This will call a cloud function to disable the user since it
cannot be done client side.
This can also be done from the firebase console.
This will send an email to the user with a link to reset their
password.
This can also be done from the firebase console.
Click on the link in the email and then copy the oobCode for the
next step.
This will attempt to reset the user's password to "querty123"
using the provided oobCode.
This is the part that is throwing different errors on different
browsers.