[mastodon-client] Fix scope parameter in /oauth/token

This commit is contained in:
Laura Hausmann 2023-11-14 17:19:17 +01:00
parent f2d7716f1a
commit b45be30d19
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

@ -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);