added a google link function

This commit is contained in:
Miodec 2021-01-29 21:24:59 +00:00
parent 616434f7a1
commit 048b2f7a30
2 changed files with 14 additions and 1 deletions

View file

@ -86,6 +86,18 @@ async function signInWithGoogle() {
}
}
function linkWithGoogle() {
firebase
.auth()
.currentUser.linkWithPopup(gmailProvider)
.then(function (result) {
console.log(result);
})
.catch(function (error) {
console.log(error);
});
}
let dontCheckUserName = false;
function signUp() {

View file

@ -7,4 +7,5 @@ global.sendVerificationEmail = Misc.sendVerificationEmail;
//these exports are just for debugging in the browser
global.snapshot = db_getSnapshot;
global.config = config;
global.addnotif = Notifications.add;
// global.addnotif = Notifications.add;
global.link = linkWithGoogle;