diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index 9063fc945d..29c331cc73 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -446,12 +446,9 @@ export default class ElectronPlatform extends VectorBasePlatform { public async getOidcClientMetadata(): Promise { const baseMetadata = await super.getOidcClientMetadata(); - const redirectUri = this.getSSOCallbackUrl(); - redirectUri.searchParams.delete(SSO_ID_KEY); // it will be shuttled via the state param instead return { ...baseMetadata, applicationType: "native", - redirectUris: [redirectUri.href], // XXX: This should be overridable in config clientUri: "https://element.io", }; @@ -460,4 +457,13 @@ export default class ElectronPlatform extends VectorBasePlatform { public getOidcClientState(): string { return `:${SSO_ID_KEY}:${this.ssoID}`; } + + /** + * The URL to return to after a successful OIDC authentication + */ + public getOidcCallbackUrl(): URL { + const url = super.getOidcCallbackUrl(); + url.protocol = "io.element.desktop"; + return url; + } }