From 1816df50fbcfdf6b4b6cc182a269a8039b0bccc1 Mon Sep 17 00:00:00 2001 From: nichenqin Date: Wed, 4 Dec 2024 19:36:18 +0800 Subject: [PATCH] fix: fix oauth --- apps/backend/src/modules/auth/oauth/github.provider.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/backend/src/modules/auth/oauth/github.provider.ts b/apps/backend/src/modules/auth/oauth/github.provider.ts index 6fd98aa53..738ed6ed6 100644 --- a/apps/backend/src/modules/auth/oauth/github.provider.ts +++ b/apps/backend/src/modules/auth/oauth/github.provider.ts @@ -6,7 +6,8 @@ export const GITHUB_PROVIDER = Symbol.for("GITHUB_PROVIDER") container.register(GITHUB_PROVIDER, { useFactory: instanceCachingFactory(() => { - return new GitHub(env.GITHUB_CLIENT_ID!, env.GITHUB_CLIENT_SECRET!) + const redirectURL = new URL("/login/github/callback", env.UNDB_BASE_URL) + return new GitHub(env.GITHUB_CLIENT_ID!, env.GITHUB_CLIENT_SECRET!, redirectURL.toString()) }), })