mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Ensured redirect is using base (#10497)
This commit is contained in:
@@ -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', {
|
||||||
|
|||||||
@@ -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', {
|
||||||
|
|||||||
@@ -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', {
|
||||||
|
|||||||
Reference in New Issue
Block a user