From b45be30d19e01e1748b2d7e077c20be3e3fc9db4 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Tue, 14 Nov 2023 17:19:17 +0100 Subject: [PATCH] [mastodon-client] Fix scope parameter in /oauth/token --- packages/backend/src/server/api/mastodon/helpers/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/helpers/auth.ts b/packages/backend/src/server/api/mastodon/helpers/auth.ts index 1fba0f128..fc28f4b20 100644 --- a/packages/backend/src/server/api/mastodon/helpers/auth.ts +++ b/packages/backend/src/server/api/mastodon/helpers/auth.ts @@ -94,7 +94,7 @@ export class AuthHelpers { public static async getAuthToken(ctx: MastoContext) { const body: any = ctx.request.body || ctx.request.query; - const scopes: string[] = (typeof body.scopes === "string" ? body.scopes.split(' ') : body.scopes) ?? ['read']; + const scopes: string[] = (typeof body.scope === "string" ? body.scope.split(' ') : body.scope) ?? ['read']; const clientId = toSingleLast(body.client_id); const code = toSingleLast(body.code);