forked from CIT/Vmeda.Online
		
	MOBILE-4653 login: Improvements to easily change classes and logins
This commit is contained in:
		
							parent
							
								
									0a37db2151
								
							
						
					
					
						commit
						f1a488d1e6
					
				@ -796,20 +796,20 @@ export class CoreLoginHelperProvider {
 | 
				
			|||||||
        launchUrl = launchUrl || siteUrl + '/admin/tool/mobile/launch.php';
 | 
					        launchUrl = launchUrl || siteUrl + '/admin/tool/mobile/launch.php';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const passport = Math.random() * 1000;
 | 
					        const passport = Math.random() * 1000;
 | 
				
			||||||
        let loginUrl = launchUrl + '?service=' + service;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        loginUrl += '&passport=' + passport;
 | 
					        const additionalParams = Object.assign(urlParams || {}, {
 | 
				
			||||||
        loginUrl += '&urlscheme=' + CoreConstants.CONFIG.customurlscheme;
 | 
					            service,
 | 
				
			||||||
 | 
					            passport,
 | 
				
			||||||
 | 
					            urlscheme: CoreConstants.CONFIG.customurlscheme,
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (urlParams) {
 | 
					        const loginUrl = CoreUrl.addParamsToUrl(launchUrl, additionalParams);
 | 
				
			||||||
            loginUrl = CoreUrl.addParamsToUrl(loginUrl, urlParams);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Store the siteurl and passport in CoreConfig for persistence.
 | 
					        // 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.
 | 
					        // 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(<StoredLoginLaunchData> {
 | 
					        await CoreConfig.set(CoreConstants.LOGIN_LAUNCH_DATA, JSON.stringify(<StoredLoginLaunchData> {
 | 
				
			||||||
            siteUrl: siteUrl,
 | 
					            siteUrl,
 | 
				
			||||||
            passport: passport,
 | 
					            passport,
 | 
				
			||||||
            ...redirectData,
 | 
					            ...redirectData,
 | 
				
			||||||
            ssoUrlParams: urlParams || {},
 | 
					            ssoUrlParams: urlParams || {},
 | 
				
			||||||
        }));
 | 
					        }));
 | 
				
			||||||
 | 
				
			|||||||
@ -89,7 +89,7 @@ export class CoreHTMLClasses {
 | 
				
			|||||||
     *
 | 
					     *
 | 
				
			||||||
     * @param prefixes Prefixes of the class mode to be removed.
 | 
					     * @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()) {
 | 
					        for (const modeClass of CoreHTMLClasses.getModeClasses()) {
 | 
				
			||||||
            if (!prefixes.some((prefix) => modeClass.startsWith(prefix))) {
 | 
					            if (!prefixes.some((prefix) => modeClass.startsWith(prefix))) {
 | 
				
			||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user