fix(rg): tmp workaround for faulty BASE_URL

needs more investigation
This commit is contained in:
2026-07-25 12:00:17 +07:00 Unverified
parent 21ad482d32
commit 303a3d1cc5
+1 -1
View File
@@ -369,7 +369,7 @@ export async function getDiscordSession() {
export async function loginDiscord() {
redirect(
`https://discord.com/oauth2/authorize?client_id=${encodeURIComponent(DISCORD_CLIENT_ID)}&response_type=code&redirect_uri=${encodeURIComponent(new URL("/rubgram/callback", BASE_URL).href)}&scope=identify+guilds.join+guilds`,
`https://discord.com/oauth2/authorize?client_id=${encodeURIComponent(DISCORD_CLIENT_ID)}&response_type=code&redirect_uri=${encodeURIComponent(new URL("/rubgram/callback", BASE_URL.includes("localhost") ? "https://buzz.sudloh.com" : BASE_URL).href)}&scope=identify+guilds.join+guilds`,
);
}