[mastodon-client] Fix scope parameter in /oauth/token
This commit is contained in:
parent
f2d7716f1a
commit
b45be30d19
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ export class AuthHelpers {
|
||||||
|
|
||||||
public static async getAuthToken(ctx: MastoContext) {
|
public static async getAuthToken(ctx: MastoContext) {
|
||||||
const body: any = ctx.request.body || ctx.request.query;
|
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 clientId = toSingleLast(body.client_id);
|
||||||
const code = toSingleLast(body.code);
|
const code = toSingleLast(body.code);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue