From fd02fedd19592362198130f84b1c1298bc170412 Mon Sep 17 00:00:00 2001 From: Jannik Zinkl Date: Wed, 21 Jun 2023 15:42:29 +0200 Subject: [PATCH] fix: improving callback handling for localhost --- services/bullboard/src/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/bullboard/src/main.ts b/services/bullboard/src/main.ts index 090703b63..477388999 100644 --- a/services/bullboard/src/main.ts +++ b/services/bullboard/src/main.ts @@ -25,7 +25,9 @@ passport.use( { clientID: env.require("GOOGLE_OAUTH_ID"), clientSecret: env.require("GOOGLE_OAUTH_SECRET"), - callbackURL: `https://${HOST}/login/callback`, + callbackURL: `${ + HOST.includes("localhost") ? "http" : "https" + }://${HOST}/login/callback`, }, // check, that only users with the correct domain can access function (