diff --git a/website/client/components/auth/authForm.vue b/website/client/components/auth/authForm.vue index c5b99ea86e..a0d75ee6fc 100644 --- a/website/client/components/auth/authForm.vue +++ b/website/client/components/auth/authForm.vue @@ -105,7 +105,12 @@ export default { }); }, methods: { + // @TODO: Abstract hello in to action or lib async socialAuth (network) { + try { + await hello(network).logout(); + } catch (e) {} // eslint-disable-line + try { let auth = await hello(network).login({ scope: 'email', diff --git a/website/client/components/auth/registerLoginReset.vue b/website/client/components/auth/registerLoginReset.vue index dba5c28c62..12a9dad124 100644 --- a/website/client/components/auth/registerLoginReset.vue +++ b/website/client/components/auth/registerLoginReset.vue @@ -427,7 +427,12 @@ export default { // ALSO it's the only way to make sure language data is reloaded and correct for the logged in user window.location.href = redirectTo; }, + // @TODO: Abstract hello in to action or lib async socialAuth (network) { + try { + await hello(network).logout(); + } catch (e) {} // eslint-disable-line + const url = window.location.href; let auth = await hello(network).login({ diff --git a/website/client/components/static/home.vue b/website/client/components/static/home.vue index 14a9314953..d516883663 100644 --- a/website/client/components/static/home.vue +++ b/website/client/components/static/home.vue @@ -652,7 +652,13 @@ }); this.$router.push('/register'); }, + // @TODO: Abstract hello in to action or lib async socialAuth (network) { + try { + await hello(network).logout(); + } catch (e) {} // eslint-disable-line + + const url = window.location.href; let auth = await hello(network).login({