fix: strip trailing slash from SERVER_PUBLIC_URL to prevent double-slash in OAuth redirect_uri

This commit is contained in:
Kirill
2026-05-22 20:31:02 +05:00
parent caa9b926e3
commit bead725036
+1 -1
View File
@@ -72,7 +72,7 @@ async function findOrCreateUserFromOAuth({ provider, providerUserId, accessToken
}
export async function registerOAuthSocialRoutes(fastify) {
const serverPublic = process.env.SERVER_PUBLIC_URL || 'http://127.0.0.1:3333'
const serverPublic = (process.env.SERVER_PUBLIC_URL || 'http://127.0.0.1:3333').replace(/\/$/, '')
/** --- VK --- */
fastify.get('/api/auth/oauth/vk', async (_request, reply) => {