Ensured redirect is using base (#10497)

This commit is contained in:
Keith Holliday
2018-07-09 10:08:19 -05:00
committed by GitHub
parent 8a4c4e10f1
commit 1fcc0d8d3a
3 changed files with 6 additions and 3 deletions

View File

@@ -112,9 +112,10 @@ export default {
} catch (e) {} // eslint-disable-line } catch (e) {} // eslint-disable-line
try { try {
const redirectUrl = `${window.location.protocol}//${window.location.host}`;
let auth = await hello(network).login({ let auth = await hello(network).login({
scope: 'email', scope: 'email',
redirect_uri: '', // eslint-disable-line camelcase redirect_uri: redirectUrl, // eslint-disable-line camelcase
}); });
await this.$store.dispatch('auth:socialAuth', { await this.$store.dispatch('auth:socialAuth', {

View File

@@ -433,10 +433,11 @@ export default {
await hello(network).logout(); await hello(network).logout();
} catch (e) {} // eslint-disable-line } catch (e) {} // eslint-disable-line
const redirectUrl = `${window.location.protocol}//${window.location.host}`;
let auth = await hello(network).login({ let auth = await hello(network).login({
scope: 'email', scope: 'email',
// explicitly pass the redirect url or it might redirect to /home // 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', { await this.$store.dispatch('auth:socialAuth', {

View File

@@ -663,10 +663,11 @@
await hello(network).logout(); await hello(network).logout();
} catch (e) {} // eslint-disable-line } catch (e) {} // eslint-disable-line
const redirectUrl = `${window.location.protocol}//${window.location.host}`;
const auth = await hello(network).login({ const auth = await hello(network).login({
scope: 'email', scope: 'email',
// explicitly pass the redirect url or it might redirect to /home // 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', { await this.$store.dispatch('auth:socialAuth', {