From 031d748d0c196b69ba7bba0fd2629b0b9fc3412f Mon Sep 17 00:00:00 2001 From: Marie Date: Sun, 31 Dec 2023 17:25:38 +0100 Subject: [PATCH] fix: /oauth/oauth to /oauth --- packages/backend/src/server/oauth/OAuth2ProviderService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/server/oauth/OAuth2ProviderService.ts b/packages/backend/src/server/oauth/OAuth2ProviderService.ts index d857f0bdd..6de903862 100644 --- a/packages/backend/src/server/oauth/OAuth2ProviderService.ts +++ b/packages/backend/src/server/oauth/OAuth2ProviderService.ts @@ -131,7 +131,7 @@ export class OAuth2ProviderService { fastify.register(multer.contentParser); - fastify.get('/oauth/authorize', async (request, reply) => { + fastify.get('/authorize', async (request, reply) => { const query: any = request.query; let param = "mastodon=true"; if (query.state) param += `&state=${query.state}`; @@ -142,7 +142,7 @@ export class OAuth2ProviderService { ); }); - fastify.get('/oauth/authorize/', async (request, reply) => { + fastify.get('/authorize/', async (request, reply) => { const query: any = request.query; let param = "mastodon=true"; if (query.state) param += `&state=${query.state}`; @@ -153,7 +153,7 @@ export class OAuth2ProviderService { ); }); - fastify.post('/oauth/token', { preHandler: upload.none() }, async (request, reply) => { + fastify.post('/token', { preHandler: upload.none() }, async (request, reply) => { const body: any = request.body || request.query; if (body.grant_type === "client_credentials") { const ret = {