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() siteConfig?: CoreSitePublicConfigResponse;
|
||||||
@Input() redirectData?: CoreRedirectPayload;
|
@Input() redirectData?: CoreRedirectPayload;
|
||||||
|
|
||||||
|
isBrowserSSO = false;
|
||||||
showScanQR = false;
|
showScanQR = false;
|
||||||
loginMethods: CoreLoginMethod[] = [];
|
loginMethods: CoreLoginMethod[] = [];
|
||||||
identityProviders: CoreSiteIdentityProvider[] = [];
|
identityProviders: CoreSiteIdentityProvider[] = [];
|
||||||
|
@ -50,9 +51,14 @@ export class CoreLoginMethodsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.siteConfig) {
|
if (this.siteConfig) {
|
||||||
const disabledFeatures = CoreLoginHelper.getDisabledFeatures(this.siteConfig);
|
this.isBrowserSSO = CoreLoginHelper.isSSOLoginNeeded(this.siteConfig.typeoflogin);
|
||||||
|
|
||||||
this.identityProviders = CoreLoginHelper.getValidIdentityProviders(this.siteConfig, disabledFeatures);
|
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) {
|
if (this.reconnect) {
|
||||||
this.showScanQR = CoreLoginHelper.displayQRInSiteScreen();
|
this.showScanQR = CoreLoginHelper.displayQRInSiteScreen();
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
<core-login-methods *ngIf="siteConfig" [siteConfig]="siteConfig" [siteUrl]="siteUrl"></core-login-methods>
|
<core-login-methods *ngIf="siteConfig" [siteConfig]="siteConfig" [siteUrl]="siteUrl"></core-login-methods>
|
||||||
</div>
|
</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>
|
<h2>{{ 'core.login.firsttime' | translate }}</h2>
|
||||||
|
|
||||||
<ion-item class="ion-text-wrap ion-no-padding core-login-instructions">
|
<ion-item class="ion-text-wrap ion-no-padding core-login-instructions">
|
||||||
|
@ -95,12 +95,12 @@
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-button *ngIf="canSignup" expand="block" class="ion-margin ion-text-wrap" fill="outline" (click)="openEmailSignup()">
|
||||||
|
{{ 'core.login.startsignup' | translate }}
|
||||||
|
</ion-button>
|
||||||
</div>
|
</div>
|
||||||
<ion-button *ngIf="canSignup" expand="block" class="ion-margin ion-text-wrap" fill="outline" (click)="openEmailSignup()">
|
|
||||||
{{ 'core.login.startsignup' | translate }}
|
|
||||||
</ion-button>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<core-empty-box *ngIf="siteCheckError" icon="fas-circle-exclamation" [message]="siteCheckError">
|
<core-empty-box *ngIf="siteCheckError" icon="fas-circle-exclamation" [message]="siteCheckError">
|
||||||
<ion-button expand="block" (click)="checkSite()" fill="outline">
|
<ion-button expand="block" (click)="checkSite()" fill="outline">
|
||||||
{{ 'core.tryagain' | translate }}
|
{{ 'core.tryagain' | translate }}
|
||||||
|
|
Loading…
Reference in New Issue