can someone help me how to convert an anonymous account (signInAnonymouslyAndRetrieveData) to a permanent account ? I have tried this:
firebase.auth().currentUser.linkAndRetrieveDataWithCredential(credential).then(function(usercred) {
var user = usercred.user;
console.log("Anonymous account successfully upgraded", user);
}, function(error) {
console.log("Error upgrading anonymous account", error);
});
but i'm getting an
cannot read property "linkAndRetrieveDataWithCredential" of null
error.