From cb2a7a88fc11d5d66e546394ac7963f7a088bd00 Mon Sep 17 00:00:00 2001 From: Geometrically <18202329+Geometrically@users.noreply.github.com> Date: Sun, 26 Jun 2022 16:17:55 -0700 Subject: [PATCH] Fix auth URL using staging (#556) --- layouts/default.vue | 4 +--- middleware/auth.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/layouts/default.vue b/layouts/default.vue index 8e11e327..3acdbd68 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -391,9 +391,7 @@ export default { }, computed: { authUrl() { - return `${ - process.env.BROWSER_BASE_URL || 'https://staging-api.modrinth.com/v2/' - }auth/init?url=${process.env.domain}${this.$route.path}` + return `${process.env.authURLBase}auth/init?url=${process.env.domain}${this.$route.path}` }, }, watch: { diff --git a/middleware/auth.js b/middleware/auth.js index 871b7799..32443d65 100644 --- a/middleware/auth.js +++ b/middleware/auth.js @@ -37,9 +37,7 @@ export default async function (context) { if (!context.$auth.user) { return context.redirect( - `${ - process.env.BROWSER_BASE_URL || 'https://staging-api.modrinth.com/v2/' - }auth/init?url=${process.env.domain}${context.route.fullPath}` + `${process.env.authURLBase}auth/init?url=${process.env.domain}${context.route.fullPath}` ) } }