From 03c8282224897d782ac298281fff9d3a16367a6a Mon Sep 17 00:00:00 2001 From: Gamebrary Date: Mon, 28 Sep 2020 16:36:16 -0700 Subject: [PATCH] formatting + todo --- src/pages/Auth.vue | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/pages/Auth.vue b/src/pages/Auth.vue index 134e1d16..8f9f5ebf 100644 --- a/src/pages/Auth.vue +++ b/src/pages/Auth.vue @@ -26,17 +26,20 @@ export default { return this.$router.replace({ name: 'dashboard' }); } - return firebase.auth().getRedirectResult().then(({ additionalUserInfo, user }) => { - if (additionalUserInfo && additionalUserInfo.isNewUser) { - this.$store.dispatch('SEND_WELCOME_EMAIL', additionalUserInfo); - } + return firebase.auth().getRedirectResult() + .then(({ additionalUserInfo, user }) => { + if (additionalUserInfo && additionalUserInfo.isNewUser) { + this.$store.dispatch('SEND_WELCOME_EMAIL', additionalUserInfo); + } - if (user) { - return this.initUser(user); - } + if (user) { + return this.initUser(user); + } - return this.handleAuthRedirect(); - }); + return this.handleAuthRedirect(); + }).catch(() => {}); + + // TODO: handle issue when viewing site in incognito mode }, methods: {