allow client credentials not just for tapbots

This commit is contained in:
cutestnekoaqua 2023-03-22 14:40:50 +01:00
parent bcd0488cf1
commit 30bc16daba
No known key found for this signature in database
GPG Key ID: 6BF0964A5069C1E0
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ mastoRouter.post("/oauth/token", async (ctx) => {
const body: any = ctx.request.body || ctx.request.query; const body: any = ctx.request.body || ctx.request.query;
console.log('token-request', body); console.log('token-request', body);
console.log('token-query', ctx.request.query); console.log('token-query', ctx.request.query);
if (body.redirect_uri.startsWith('com.tapbots') && body.grant_type === 'client_credentials') { if (body.grant_type === 'client_credentials') {
const ret = { const ret = {
access_token: uuid(), access_token: uuid(),
token_type: "Bearer", token_type: "Bearer",