diff --git a/packages/backend/src/server/api/mastodon/entities/oauth/oauth.ts b/packages/backend/src/server/api/mastodon/entities/oauth/oauth.ts index 24a7008cd..a8498f728 100644 --- a/packages/backend/src/server/api/mastodon/entities/oauth/oauth.ts +++ b/packages/backend/src/server/api/mastodon/entities/oauth/oauth.ts @@ -4,8 +4,10 @@ **/ namespace OAuth { export type Application = { + id: string; name: string; website: string | null; + redirect_uri: string; vapid_key: string | undefined; client_id: string; client_secret: string; diff --git a/packages/backend/src/server/api/mastodon/helpers/auth.ts b/packages/backend/src/server/api/mastodon/helpers/auth.ts index 12adb67fd..41f872728 100644 --- a/packages/backend/src/server/api/mastodon/helpers/auth.ts +++ b/packages/backend/src/server/api/mastodon/helpers/auth.ts @@ -37,11 +37,13 @@ export class AuthHelpers { }).then((x) => OAuthApps.findOneByOrFail(x.identifiers[0])); return { + id: app.id, name: app.name, - website: website, + website: app.website, + redirect_uri: app.redirectUris.join('\n'), client_id: app.clientId, client_secret: app.clientSecret, - vapid_key: await fetchMeta().then(meta => meta.swPublicKey ?? undefined), + vapid_key: await fetchMeta().then(meta => meta.swPublicKey), }; }