Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function login() {
- var provider = new firebase.auth.GoogleAuthProvider();
- firebase.auth().signInWithPopup(provider).then(function (result) {
- window.user = result.user;
- adminCheck();
- }).catch(function (error) {
- console.log(error.code, error.message);
- }); }
- firebase.auth().onAuthStateChanged(function (user) {
- if (user) {
- window.user = user;
- reinitialized = true;
- refreshNotifications();
- } else {
- askForLogin();
- }
- });
Add Comment
Please, Sign In to add comment