Merge pull request #27017 from element-hq/t3chguy/oidc-desktop
Fix Native OIDC for Element Desktop
This commit is contained in:
commit
35fe447aae
1 changed files with 7 additions and 1 deletions
|
@ -57,6 +57,8 @@ interface SquirrelUpdate {
|
|||
updateURL: string;
|
||||
}
|
||||
|
||||
const SSO_ID_KEY = "element-desktop-ssoid";
|
||||
|
||||
const isMac = navigator.platform.toUpperCase().includes("MAC");
|
||||
|
||||
function platformFriendlyName(): string {
|
||||
|
@ -378,7 +380,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
public getSSOCallbackUrl(fragmentAfterLogin: string): URL {
|
||||
const url = super.getSSOCallbackUrl(fragmentAfterLogin);
|
||||
url.protocol = "element";
|
||||
url.searchParams.set("element-desktop-ssoid", this.ssoID);
|
||||
url.searchParams.set(SSO_ID_KEY, this.ssoID);
|
||||
return url;
|
||||
}
|
||||
|
||||
|
@ -451,4 +453,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
clientUri: "https://element.io",
|
||||
};
|
||||
}
|
||||
|
||||
public getOidcClientState(): string {
|
||||
return `:${SSO_ID_KEY}:${this.ssoID}`;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue