Reputation: 7708
I am getting a :
Uncaught TypeError: user.reauthenticate is not a function
with this code below.
var user = firebase.auth().currentUser;
var credentials = firebase.auth.EmailAuthProvider.credential(user.email,'foo');
console.log(user) // the currentUser object
console.log(user.reauthenticate) // undefined
user.reauthenticate(credentials)
.then(() => {
// Do something
}, err => console.log(error));
I just followed this guide and this accepted answer by Frank van Puffelen.
Upvotes: 1
Views: 1901
Reputation: 598740
firebaser here
We made a breaking change in the 4.0 version of the Firebase Web SDK. From the release notes:
BREAKING:
firebase.User.prototype.reauthenticate
has been removed in favor offirebase.User.prototype.reauthenticateWithCredential
.
As far as I can tell the reauthenticateWithCredential
is a drop-in replacement for the old method.
Upvotes: 2