diff --git a/packages/backend/src/server/oauth/OAuth2ProviderService.ts b/packages/backend/src/server/oauth/OAuth2ProviderService.ts index 2b9954fe5..afd06721a 100644 --- a/packages/backend/src/server/oauth/OAuth2ProviderService.ts +++ b/packages/backend/src/server/oauth/OAuth2ProviderService.ts @@ -1,6 +1,5 @@ import dns from 'node:dns/promises'; import { Inject, Injectable } from '@nestjs/common'; -import Provider, { type Adapter, type Account, AdapterPayload } from 'oidc-provider'; import fastifyMiddie, { IncomingMessageExtended } from '@fastify/middie'; import { JSDOM } from 'jsdom'; import parseLinkHeader from 'parse-link-header'; @@ -429,8 +428,6 @@ export class OAuth2ProviderService { }); }); - // oidc-provider provides many more endpoints for OpenID support and there's - // no way to turn it off. // For now only allow the basic OAuth endpoints, to start small and evaluate // this feature for some time, given that this is security related. fastify.get<{ Querystring: OAuthRequestQuery }>('/oauth/authorize', async (request, reply) => { @@ -451,6 +448,8 @@ export class OAuth2ProviderService { reply.header('Cache-Control', 'no-store'); return await reply.view('oauth', { transactionId: oauth2?.transactionID, + clientId: oauth2?.client, + scope: oauth2?.req.scope.join(' '), }); }); fastify.post('/oauth/decision', async () => { }); diff --git a/packages/backend/src/server/web/views/oauth.pug b/packages/backend/src/server/web/views/oauth.pug index 717336f5e..c4731b811 100644 --- a/packages/backend/src/server/web/views/oauth.pug +++ b/packages/backend/src/server/web/views/oauth.pug @@ -7,4 +7,3 @@ block meta meta(name='misskey:oauth:transaction-id' content=transactionId) meta(name='misskey:oauth:client-id' content=clientId) meta(name='misskey:oauth:scope' content=scope) - meta(name='misskey:oauth:redirection-uri' content=redirectionUri) diff --git a/packages/frontend/src/components/MkButton.vue b/packages/frontend/src/components/MkButton.vue index e40b655fb..38c79e89d 100644 --- a/packages/frontend/src/components/MkButton.vue +++ b/packages/frontend/src/components/MkButton.vue @@ -5,6 +5,7 @@ :class="[$style.root, { [$style.inline]: inline, [$style.primary]: primary, [$style.gradate]: gradate, [$style.danger]: danger, [$style.rounded]: rounded, [$style.full]: full, [$style.small]: small, [$style.large]: large, [$style.transparent]: transparent, [$style.asLike]: asLike }]" :type="type" :name="name" + :value="value" @click="emit('click', $event)" @mousedown="onMousedown" > @@ -46,6 +47,7 @@ const props = defineProps<{ transparent?: boolean; asLike?: boolean; name?: string; + value?: string; }>(); const emit = defineEmits<{ diff --git a/packages/frontend/src/pages/oauth.vue b/packages/frontend/src/pages/oauth.vue index 29abef989..77d64ef95 100644 --- a/packages/frontend/src/pages/oauth.vue +++ b/packages/frontend/src/pages/oauth.vue @@ -4,18 +4,18 @@
-

{{ $t('_auth.permission', { name }) }}

+

{{ i18n.t('_auth.permission', { name }) }}

{{ i18n.ts._auth.permissionAsk }}

    -
  • {{ $t(`_permissions.${p}`) }}
  • +
  • {{ i18n.t(`_permissions.${p}`) }}
-
{{ $t('_auth.shareAccess', { name }) }}
+
{{ i18n.t('_auth.shareAccess', { name }) }}
{{ i18n.ts._auth.shareAccessAsk }}
- {{ i18n.ts.cancel }} + {{ i18n.ts.cancel }} {{ i18n.ts.accept }}