diff --git a/website/client/components/auth/authForm.vue b/website/client/components/auth/authForm.vue index ced6e1e44f..c5b99ea86e 100644 --- a/website/client/components/auth/authForm.vue +++ b/website/client/components/auth/authForm.vue @@ -106,16 +106,23 @@ export default { }, methods: { async socialAuth (network) { - let auth = await hello(network).login({ - scope: 'email', - redirect_uri: '', // eslint-disable-line camelcase - }); + try { + let auth = await hello(network).login({ + scope: 'email', + redirect_uri: '', // eslint-disable-line camelcase + }); - await this.$store.dispatch('auth:socialAuth', { - auth, - }); + await this.$store.dispatch('auth:socialAuth', { + auth, + }); - await this.finishAuth(); + await this.finishAuth(); + } catch (err) { + console.error(err); // eslint-disable-line no-console + // logout the user + await hello(network).logout(); + this.socialAuth(network); // login again + } }, async register () { if (!this.email) {