Skip to content

Commit

Permalink
Merge pull request #13650 from vector-im/t3chguy/sso_hash
Browse files Browse the repository at this point in the history
Pass screenAfterLogin through SSO in the callback url
  • Loading branch information
t3chguy authored May 14, 2020
2 parents 4682b09 + 6348b17 commit 7246d9f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/vector/platform/ElectronPlatform.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,15 +448,16 @@ export default class ElectronPlatform extends VectorBasePlatform {
});
}

getSSOCallbackUrl(hsUrl: string, isUrl: string): URL {
const url = super.getSSOCallbackUrl(hsUrl, isUrl);
getSSOCallbackUrl(hsUrl: string, isUrl: string, fragmentAfterLogin: string): URL {
const url = super.getSSOCallbackUrl(hsUrl, isUrl, fragmentAfterLogin);
url.protocol = "riot";
url.searchParams.set("riot-desktop-ssoid", this.ssoID);
return url;
}

startSingleSignOn(mxClient: MatrixClient, loginType: "sso" | "cas") {
super.startSingleSignOn(mxClient, loginType); // this will get intercepted by electron-main will-navigate
startSingleSignOn(mxClient: MatrixClient, loginType: "sso" | "cas", fragmentAfterLogin: string) {
// this will get intercepted by electron-main will-navigate
super.startSingleSignOn(mxClient, loginType, fragmentAfterLogin);
Modal.createTrackedDialog('Electron', 'SSO', InfoDialog, {
title: _t("Go to your browser to complete Sign In"),
description: <Spinner />,
Expand Down

0 comments on commit 7246d9f

Please sign in to comment.