diff --git a/src/js/account.js b/src/js/account.js index a28c6f803..55ca52017 100644 --- a/src/js/account.js +++ b/src/js/account.js @@ -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() { diff --git a/src/js/exports.js b/src/js/exports.js index 369fd5ce6..6630acbaa 100644 --- a/src/js/exports.js +++ b/src/js/exports.js @@ -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;