While working on implementing support for OAuth login in Continuwuity, I found that the matrix-js-sdk sends a request to https://<issuer>/.well-known/openid-configuration before opening the authorization_endpoint, performed by this call to createSigninRequest which calls getAuthorizationEndpoint in oidc-client-ts. This behavior is described in RFC 8414 but is not required by the Matrix specification, which has a dedicated endpoint for fetching this configuration. (MAS responds to this well-known URL with the same response as the Matrix-specific discovery endpoint.) I would expect the SDK to only use the Matrix-specific discovery endpoint instead of also sending requests to the RFC 8414 endpoint.
While working on implementing support for OAuth login in Continuwuity, I found that the matrix-js-sdk sends a request to
https://<issuer>/.well-known/openid-configurationbefore opening theauthorization_endpoint, performed by this call tocreateSigninRequestwhich callsgetAuthorizationEndpointin oidc-client-ts. This behavior is described in RFC 8414 but is not required by the Matrix specification, which has a dedicated endpoint for fetching this configuration. (MAS responds to this well-known URL with the same response as the Matrix-specific discovery endpoint.) I would expect the SDK to only use the Matrix-specific discovery endpoint instead of also sending requests to the RFC 8414 endpoint.