Move auth domain to public runtime config (#246)

* Allow specifying a custom auth URL

* Readd default

* Move Host URL to top

* wat

* Move auth domain to public runtime config
This commit is contained in:
Geometrically
2021-05-28 21:32:06 -07:00
committed by GitHub
parent a061fb5421
commit d0df105dda
3 changed files with 5 additions and 3 deletions

View File

@@ -199,7 +199,7 @@ export default {
}, },
computed: { computed: {
authUrl() { authUrl() {
return `${this.$axios.defaults.baseURL}auth/init?url=${process.env.domain}${this.$route.fullPath}` return `${this.$axios.defaults.baseURL}auth/init?url=${this.$store.app.$config.utils.domain}${this.$route.fullPath}`
}, },
userUrl() { userUrl() {
return `/user/${this.$auth.user.id}` return `/user/${this.$auth.user.id}`

View File

@@ -171,7 +171,6 @@ export default {
}, },
env: { env: {
version: process.env.VERSION_ID || 'unknown', version: process.env.VERSION_ID || 'unknown',
domain: getDomain(),
}, },
publicRuntimeConfig: { publicRuntimeConfig: {
axios: { axios: {
@@ -186,6 +185,9 @@ export default {
analytics: { analytics: {
base_url: process.env.ARIADNE_URL, base_url: process.env.ARIADNE_URL,
}, },
utils: {
domain: getDomain(),
},
}, },
} }

View File

@@ -81,7 +81,7 @@ export default {
}, },
computed: { computed: {
authUrl() { authUrl() {
return `${this.$axios.defaults.baseURL}auth/init?url=${process.env.domain}${this.$route.fullPath}` return `${this.$axios.defaults.baseURL}auth/init?url=${this.$store.app.$config.utils.domain}${this.$route.fullPath}`
}, },
}, },
} }