From 6348b17e23e67a2ccec95ba8e8412606ce15f621 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 13 May 2020 06:24:05 +0100 Subject: [PATCH] Pass screenAfterLogin through SSO in the callback url Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/vector/platform/ElectronPlatform.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index 4a07e202f7..c362d45482 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -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: ,