From 7cabe9289eb58cb46261e33627ba395d491e55ad Mon Sep 17 00:00:00 2001 From: veryCrunchy Date: Fri, 1 Mar 2024 02:08:49 +0100 Subject: [PATCH] fix: temp callback fix --- src/main.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 26befb6..a3558db 100644 --- a/src/main.ts +++ b/src/main.ts @@ -113,15 +113,16 @@ app.get("/token/validate", async (req, res) => { res.status(401).send((e as Error).message); } }); -const port = process.env.PORT || 4000 +const port = process.env.PORT || 4000; app.listen(port, () => { console.log(`Running at ${process.env.BASE_URL}`); }); async function handleAuthCallback(req: Request, res: Response) { const redirectPath = req.cookies.redirect_path ?? "/"; - const callbackURL = - req.cookies.token_callback?.toString() ?? process.env.CALLBACK_URL; + // const callbackURL = + // req.cookies.token_callback?.toString() ?? process.env.CALLBACK_URL; + const callbackURL = process.env.CALLBACK_URL ?? ""; const error = req.query.error?.toString() ?? null; let url = new URL(callbackURL); url.searchParams.set("redirect", redirectPath);