diff --git a/src/core/features/login/services/login-helper.ts b/src/core/features/login/services/login-helper.ts index 367d19c4802..5b148bdd2f9 100644 --- a/src/core/features/login/services/login-helper.ts +++ b/src/core/features/login/services/login-helper.ts @@ -796,20 +796,20 @@ export class CoreLoginHelperProvider { launchUrl = launchUrl || siteUrl + '/admin/tool/mobile/launch.php'; const passport = Math.random() * 1000; - let loginUrl = launchUrl + '?service=' + service; - loginUrl += '&passport=' + passport; - loginUrl += '&urlscheme=' + CoreConstants.CONFIG.customurlscheme; + const additionalParams = Object.assign(urlParams || {}, { + service, + passport, + urlscheme: CoreConstants.CONFIG.customurlscheme, + }); - if (urlParams) { - loginUrl = CoreUrl.addParamsToUrl(loginUrl, urlParams); - } + const loginUrl = CoreUrl.addParamsToUrl(launchUrl, additionalParams); // Store the siteurl and passport in CoreConfig for persistence. // We are "configuring" the app to wait for an SSO. CoreConfig shouldn't be used as a temporary storage. await CoreConfig.set(CoreConstants.LOGIN_LAUNCH_DATA, JSON.stringify( { - siteUrl: siteUrl, - passport: passport, + siteUrl, + passport, ...redirectData, ssoUrlParams: urlParams || {}, })); diff --git a/src/core/singletons/html-classes.ts b/src/core/singletons/html-classes.ts index 27b1ccaadad..93ac3ef88cc 100644 --- a/src/core/singletons/html-classes.ts +++ b/src/core/singletons/html-classes.ts @@ -89,7 +89,7 @@ export class CoreHTMLClasses { * * @param prefixes Prefixes of the class mode to be removed. */ - protected static removeModeClasses(prefixes: string[]): void { + static removeModeClasses(prefixes: string[]): void { for (const modeClass of CoreHTMLClasses.getModeClasses()) { if (!prefixes.some((prefix) => modeClass.startsWith(prefix))) { continue;