From 1fcc0d8d3afca9f5dc0f150a99f41730bd44e8e4 Mon Sep 17 00:00:00 2001 From: Keith Holliday Date: Mon, 9 Jul 2018 10:08:19 -0500 Subject: [PATCH] Ensured redirect is using base (#10497) --- website/client/components/auth/authForm.vue | 3 ++- website/client/components/auth/registerLoginReset.vue | 3 ++- website/client/components/static/home.vue | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/website/client/components/auth/authForm.vue b/website/client/components/auth/authForm.vue index a0d75ee6fc..7c40268b3d 100644 --- a/website/client/components/auth/authForm.vue +++ b/website/client/components/auth/authForm.vue @@ -112,9 +112,10 @@ export default { } catch (e) {} // eslint-disable-line try { + const redirectUrl = `${window.location.protocol}//${window.location.host}`; let auth = await hello(network).login({ scope: 'email', - redirect_uri: '', // eslint-disable-line camelcase + redirect_uri: redirectUrl, // eslint-disable-line camelcase }); await this.$store.dispatch('auth:socialAuth', { diff --git a/website/client/components/auth/registerLoginReset.vue b/website/client/components/auth/registerLoginReset.vue index c0385221ea..e6dec1f27e 100644 --- a/website/client/components/auth/registerLoginReset.vue +++ b/website/client/components/auth/registerLoginReset.vue @@ -433,10 +433,11 @@ export default { await hello(network).logout(); } catch (e) {} // eslint-disable-line + const redirectUrl = `${window.location.protocol}//${window.location.host}`; let auth = await hello(network).login({ scope: 'email', // explicitly pass the redirect url or it might redirect to /home - redirect_uri: '', // eslint-disable-line camelcase + redirect_uri: redirectUrl, // eslint-disable-line camelcase }); await this.$store.dispatch('auth:socialAuth', { diff --git a/website/client/components/static/home.vue b/website/client/components/static/home.vue index 01b67919f4..7b14b09173 100644 --- a/website/client/components/static/home.vue +++ b/website/client/components/static/home.vue @@ -663,10 +663,11 @@ await hello(network).logout(); } catch (e) {} // eslint-disable-line + const redirectUrl = `${window.location.protocol}//${window.location.host}`; const auth = await hello(network).login({ scope: 'email', // explicitly pass the redirect url or it might redirect to /home - redirect_uri: '', // eslint-disable-line camelcase + redirect_uri: redirectUrl, // eslint-disable-line camelcase }); await this.$store.dispatch('auth:socialAuth', {