fix: strip trailing slash from SERVER_PUBLIC_URL to prevent double-slash in OAuth redirect_uri
This commit is contained in:
@@ -72,7 +72,7 @@ async function findOrCreateUserFromOAuth({ provider, providerUserId, accessToken
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function registerOAuthSocialRoutes(fastify) {
|
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 --- */
|
/** --- VK --- */
|
||||||
fastify.get('/api/auth/oauth/vk', async (_request, reply) => {
|
fastify.get('/api/auth/oauth/vk', async (_request, reply) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user