Hi, can you support me about the following code of firebase? credential is refer to? I don't know if credential variable is a json with email and password or just the password.
var user = firebase.auth().currentUser;
var credential;
// Prompt the user to re-provide their sign-in credentials
user.reauthenticateAndRetrieveDataWithCredential(credential).then(function() {
// User re-authenticated.
}).catch(function(error) {
// An error happened.
});
I am having the next error:
code: "auth/argument-error"
message: "reauthenticateAndRetrieveDataWithCredential failed: First argument \"credential\" must be a valid credential."