MOBILE-4201 login: Do not show other auth methods or signup if sso
parent
a4d7ffeb5e
commit
6f6b8f2a2d
|
@ -31,6 +31,7 @@ export class CoreLoginMethodsComponent implements OnInit {
|
|||
@Input() siteConfig?: CoreSitePublicConfigResponse;
|
||||
@Input() redirectData?: CoreRedirectPayload;
|
||||
|
||||
isBrowserSSO = false;
|
||||
showScanQR = false;
|
||||
loginMethods: CoreLoginMethod[] = [];
|
||||
identityProviders: CoreSiteIdentityProvider[] = [];
|
||||
|
@ -50,9 +51,14 @@ export class CoreLoginMethodsComponent implements OnInit {
|
|||
}
|
||||
|
||||
if (this.siteConfig) {
|
||||
this.isBrowserSSO = CoreLoginHelper.isSSOLoginNeeded(this.siteConfig.typeoflogin);
|
||||
|
||||
if (!this.isBrowserSSO) {
|
||||
// Identity providers won't be shown if login on browser.
|
||||
const disabledFeatures = CoreLoginHelper.getDisabledFeatures(this.siteConfig);
|
||||
|
||||
this.identityProviders = CoreLoginHelper.getValidIdentityProviders(this.siteConfig, disabledFeatures);
|
||||
}
|
||||
|
||||
if (this.reconnect) {
|
||||
this.showScanQR = CoreLoginHelper.displayQRInSiteScreen();
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<core-login-methods *ngIf="siteConfig" [siteConfig]="siteConfig" [siteUrl]="siteUrl"></core-login-methods>
|
||||
</div>
|
||||
|
||||
<div class="core-login-sign-up" *ngIf="canSignup || authInstructions">
|
||||
<div class="core-login-sign-up" *ngIf="!isBrowserSSO && (canSignup || authInstructions)">
|
||||
<h2>{{ 'core.login.firsttime' | translate }}</h2>
|
||||
|
||||
<ion-item class="ion-text-wrap ion-no-padding core-login-instructions">
|
||||
|
@ -95,12 +95,12 @@
|
|||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
|
||||
</div>
|
||||
<ion-button *ngIf="canSignup" expand="block" class="ion-margin ion-text-wrap" fill="outline" (click)="openEmailSignup()">
|
||||
{{ 'core.login.startsignup' | translate }}
|
||||
</ion-button>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<core-empty-box *ngIf="siteCheckError" icon="fas-circle-exclamation" [message]="siteCheckError">
|
||||
<ion-button expand="block" (click)="checkSite()" fill="outline">
|
||||
{{ 'core.tryagain' | translate }}
|
||||
|
|
Loading…
Reference in New Issue