From ffc8f133c9a2686eddfb0125d3218ce0b032dde1 Mon Sep 17 00:00:00 2001 From: Jai A Date: Fri, 24 Jun 2022 22:44:47 -0700 Subject: [PATCH] Fix auth URL compute --- layouts/default.vue | 4 +++- nuxt.config.js | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/layouts/default.vue b/layouts/default.vue index 47a16d5a7..a5e903e3d 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -391,7 +391,9 @@ export default { }, computed: { authUrl() { - return `${this.$axios.defaults.baseURL}auth/init?url=${process.env.domain}${this.$route.path}` + return `${ + process.env.BROWSER_BASE_URL || 'https://staging-api.modrinth.com/v2/' + }auth/init?url=${process.env.domain}${this.$route.path}` }, }, watch: { diff --git a/nuxt.config.js b/nuxt.config.js index 9fcbf7fc5..cb7444b9b 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -280,6 +280,8 @@ export default { branch: process.env.VERCEL_GIT_COMMIT_REF || 'master', hash: process.env.VERCEL_GIT_COMMIT_SHA || 'unknown', domain: getDomain(), + authURLBase: + process.env.BROWSER_BASE_URL || 'https://staging-api.modrinth.com/v2/', }, publicRuntimeConfig: { axios: {