MOBILE-4201 login: Reintroduce the skip confirmation when SSO login

main
Pau Ferrer Ocaña 2023-09-14 17:23:50 +02:00
parent 6f6b8f2a2d
commit 8f7e153277
3 changed files with 16 additions and 3 deletions

View File

@ -106,6 +106,10 @@ export class CoreLoginCredentialsPage implements OnInit, OnDestroy {
await this.checkSite();
if (this.isBrowserSSO && CoreLoginHelper.shouldSkipCredentialsScreenOnSSO()) {
this.openBrowserSSO();
}
if (CorePlatform.isIOS() && !this.isBrowserSSO) {
// Make iOS auto-fill work. The field that isn't focused doesn't get updated, do it manually.
// Debounce it to prevent triggering this function too often when the user is typing.

View File

@ -903,11 +903,19 @@ export class CoreLoginHelperProvider {
*
* @param typeOfLogin TypeOfLogin.BROWSER or TypeOfLogin.EMBEDDED.
* @returns True if confirm modal should be shown, false otherwise.
* @deprecated since 4.3 Not used anymore.
* @deprecated since 4.3 Not used anymore. See shouldSkipCredentialsScreenOnSSO.
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
shouldShowSSOConfirm(typeOfLogin: TypeOfLogin): boolean {
return false;
return !this.isSSOEmbeddedBrowser(typeOfLogin) && !this.shouldSkipCredentialsScreenOnSSO();
}
/**
* Check if we can skip credentials page.
*
* @returns If true, the browser should be opened without the user prompt.
*/
shouldSkipCredentialsScreenOnSSO(): boolean {
return String(CoreConstants.CONFIG.skipssoconfirmation) === 'true';
}
/**

View File

@ -46,6 +46,7 @@ export interface EnvironmentConfig {
multisitesdisplay: CoreLoginSiteSelectorListMethod;
sitefindersettings: Partial<CoreLoginSiteFinderSettings>;
onlyallowlistedsites: boolean;
skipssoconfirmation: boolean;
forcedefaultlanguage: boolean;
privacypolicy: string;
notificoncolor: string;