firebase/snippets-web

romeo

jessem2007 opened this issue · 2 comments

import { getAuth, linkWithCredential } from "firebase/auth";
const auth = getAuth();
linkWithCredential(auth.currentUser, credential)
.then((usercred) => {
const user = usercred.user;
console.log("Anonymous account successfully upgraded", user);
}).catch((error) => {
console.log("Error upgrading anonymous account", error);
});

@jessem2007 Are you having some kind of issue with the snippet above?

Closing this since there hasn't been any update for a week.