-
Notifications
You must be signed in to change notification settings - Fork 928
Can no longer get credential
(of type AuthCredential
) from a UserCredential
interface
#5712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
For anyone else encountering this. I've been able to work around it via; const authCred = EmailAuthProvider.credential(email, oldPassword)
const authUser = (await signInWithCredential(this.auth(), authCred)).user
await reauthenticateWithCredential(authUser, authCred) |
With your upgrade, are you using the modular version or the compatibility layer? The modular version does not expose a credential on the The v9 compatibility layer (i.e. |
@sam-gc I am attempting to move over to the modular version. I have indeed just decided to use the approach taken above (and is the approach you mentioned), which seems to be working for our application. If, as you say, the Also - regarding the Thanks! :) |
Thanks for the note and point out the docs. The linked PR should update the docs. I'm going to close this one out for now, but please reopen or comment if you're still running into issues. |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Steps to reproduce:
Calling
signInWithEmailAndPassword
returns aUserCredential
that no longer allows us to pluck theAuthCredential
from.Relevant Code:
The above code used to work just fine in Firebase SDK 8. We are attempting to upgrade to Firebase SDK 9, but see no way of getting the
credential
off the return value of the function in order to trigger thereauthenticateWithCredential
function afterwards (Specifically we are implementing a change-password flow here).I'm unsure if this is a mistake/omission on the interfacebecause the documentation still mentions that the
UserCredential
interface should expose anAuthCredential
, of it the way to do this flow has changed.The text was updated successfully, but these errors were encountered: