mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 11:15:53 +03:00
Fix element-desktop-ssoid being
included in OIDC Authorization call
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
2c8b32d2c9
commit
b82100ede8
1 changed files with 6 additions and 5 deletions
|
@ -377,10 +377,12 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
return this.ipc.call("getAvailableSpellCheckLanguages");
|
return this.ipc.call("getAvailableSpellCheckLanguages");
|
||||||
}
|
}
|
||||||
|
|
||||||
public getSSOCallbackUrl(fragmentAfterLogin?: string): URL {
|
public getSSOCallbackUrl(forOidc = false, fragmentAfterLogin?: string): URL {
|
||||||
const url = super.getSSOCallbackUrl(fragmentAfterLogin);
|
const url = super.getSSOCallbackUrl(forOidc, fragmentAfterLogin);
|
||||||
url.protocol = "element";
|
url.protocol = "element";
|
||||||
url.searchParams.set(SSO_ID_KEY, this.ssoID);
|
if (!forOidc) {
|
||||||
|
url.searchParams.set(SSO_ID_KEY, this.ssoID);
|
||||||
|
}
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -446,8 +448,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
|
|
||||||
public async getOidcClientMetadata(): Promise<OidcRegistrationClientMetadata> {
|
public async getOidcClientMetadata(): Promise<OidcRegistrationClientMetadata> {
|
||||||
const baseMetadata = await super.getOidcClientMetadata();
|
const baseMetadata = await super.getOidcClientMetadata();
|
||||||
const redirectUri = this.getSSOCallbackUrl();
|
const redirectUri = this.getSSOCallbackUrl(true);
|
||||||
redirectUri.searchParams.delete(SSO_ID_KEY); // it will be shuttled via the state param instead
|
|
||||||
return {
|
return {
|
||||||
...baseMetadata,
|
...baseMetadata,
|
||||||
applicationType: "native",
|
applicationType: "native",
|
||||||
|
|
Loading…
Reference in a new issue