Gather validated OIDC config during autodiscovery (#27047)

This commit is contained in:
Michael Telatynski 2024-02-23 16:43:07 +00:00 committed by GitHub
parent 465131a836
commit 282d71730b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -199,7 +199,7 @@ async function verifyServerConfig(): Promise<IConfigOptions> {
} }
} }
validatedConfig = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, true); validatedConfig = await AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, true);
} catch (e) { } catch (e) {
const { hsUrl, isUrl, userId } = await Lifecycle.getStoredSessionVars(); const { hsUrl, isUrl, userId } = await Lifecycle.getStoredSessionVars();
if (hsUrl && userId) { if (hsUrl && userId) {

View file

@ -223,6 +223,9 @@ describe("loading:", function () {
// Pass the liveliness checks // Pass the liveliness checks
httpBackend.when("GET", "/versions").respond(200, { versions: SERVER_SUPPORTED_MATRIX_VERSIONS }); httpBackend.when("GET", "/versions").respond(200, { versions: SERVER_SUPPORTED_MATRIX_VERSIONS });
httpBackend.when("GET", "/_matrix/identity/v2").respond(200, {}); httpBackend.when("GET", "/_matrix/identity/v2").respond(200, {});
httpBackend
.when("GET", "/_matrix/client/unstable/org.matrix.msc2965/auth_issuer")
.respond(404, { errcode: "M_UNRECOGNIZED", error: "Unrecognized request" });
return sleep(1) return sleep(1)
.then(async () => { .then(async () => {