diff --git a/webapp/api/oauth/_templates/authorize.ts b/webapp/api/oauth/_templates/authorize.ts index f1df110..33261fe 100644 --- a/webapp/api/oauth/_templates/authorize.ts +++ b/webapp/api/oauth/_templates/authorize.ts @@ -7,7 +7,10 @@ interface AuthorizeProps { scopes: { name: string; description: string | null }[] oauthFields: { clientId: string - redirectUri: string + // client が指定してきた redirect_uri + redirectUri?: string + // client が指定してきた redirect_uri または DB に保存されている callback + redirectTo: string state?: string scope?: string token: string @@ -66,11 +69,13 @@ export const _Authorize = ({
- + ${oauthFields.redirectUri + ? html`` + : ''} ${oauthFields.state ? html`

- ${new URL(oauthFields.redirectUri).origin} へリダイレクトします。 + ${new URL(oauthFields.redirectTo).origin} へリダイレクトします。 このアドレスが意図しているものか確認してください。

diff --git a/webapp/api/oauth/authorize.ts b/webapp/api/oauth/authorize.ts index db155ef..ec345dc 100644 --- a/webapp/api/oauth/authorize.ts +++ b/webapp/api/oauth/authorize.ts @@ -225,7 +225,8 @@ app.get( })), oauthFields: { clientId, - redirectUri: redirectTo, + redirectUri, + redirectTo, state, scope, token,