summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/oauth
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-03-02 16:05:12 -0500
committerFreya Murphy <freya@freyacat.org>2026-03-05 12:55:43 -0500
commit587ab8500abb2d8b0a494dc05952c9919cc7f66f (patch)
tree07f50e1153a029158baed106aa8367c9fa32cd7a /packages/backend/src/server/oauth
parentMerge pull request #17217 from misskey-dev/develop (diff)
downloadmisskey-587ab8500abb2d8b0a494dc05952c9919cc7f66f.tar.gz
misskey-587ab8500abb2d8b0a494dc05952c9919cc7f66f.tar.bz2
misskey-587ab8500abb2d8b0a494dc05952c9919cc7f66f.zip
split url into webUrl and localUrl (like mastodon)
Diffstat (limited to 'packages/backend/src/server/oauth')
-rw-r--r--packages/backend/src/server/oauth/OAuth2ProviderService.ts10
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());