diff options
Diffstat (limited to 'packages/backend/src/server/oauth/OAuth2ProviderService.ts')
| -rw-r--r-- | packages/backend/src/server/oauth/OAuth2ProviderService.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/backend/src/server/oauth/OAuth2ProviderService.ts b/packages/backend/src/server/oauth/OAuth2ProviderService.ts index 840c34b806..2682aeace8 100644 --- a/packages/backend/src/server/oauth/OAuth2ProviderService.ts +++ b/packages/backend/src/server/oauth/OAuth2ProviderService.ts @@ -341,7 +341,7 @@ export class OAuth2ProviderService { // "Authorization servers MUST support PKCE [RFC7636]." this.#server.grant(oauth2Pkce.extensions()); this.#server.grant(oauth2orize.grant.code({ - modes: getQueryMode(config.url), + modes: getQueryMode(config.webUrl), }, (client, redirectUri, token, ares, areq, locals, done) => { (async (): Promise<OmitFirstElement<Parameters<typeof done>>> => { this.#logger.info(`Checking the user before sending authorization code to ${client.id}`); @@ -431,9 +431,9 @@ export class OAuth2ProviderService { // https://indieauth.spec.indieweb.org/#indieauth-server-metadata public generateRFC8414() { return { - issuer: this.config.url, - authorization_endpoint: new URL('/oauth/authorize', this.config.url), - token_endpoint: new URL('/oauth/token', this.config.url), + issuer: this.config.webUrl, + authorization_endpoint: new URL('/oauth/authorize', this.config.webUrl), + token_endpoint: new URL('/oauth/token', this.config.webUrl), scopes_supported: kinds, response_types_supported: ['code'], grant_types_supported: ['authorization_code'], @@ -521,7 +521,7 @@ export class OAuth2ProviderService { }) as ValidateFunctionArity2)); fastify.use('/authorize', this.#server.errorHandler({ mode: 'indirect', - modes: getQueryMode(this.config.url), + modes: getQueryMode(this.config.webUrl), })); fastify.use('/authorize', this.#server.errorHandler()); |