Skip to content

Commit

Permalink
Merge pull request primefaces#274 from Nanitor/dev-fix-nondomain-signin
Browse files Browse the repository at this point in the history
Fix non-domain sign in.
  • Loading branch information
Alfred Hall authored Jul 31, 2019
2 parents 9ab120a + 057a4e9 commit 3627921
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/account/signin.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ export class SigninComponent {

signin(event) {
event.preventDefault();
let r = this.accountService.signin(this.model.email, this.model.password, this.signinDomain, this.model.account_name);

let r = null;
if (this.isLocalAuth()) {
r = this.accountService.signin(this.model.email, this.model.password, "", "");
} else {
r = this.accountService.signin("", this.model.password, this.signinDomain, this.model.account_name);
}
r.subscribe(
(data: SigninResponse) => {
let obj: SigninResponse = data;
Expand All @@ -77,7 +83,7 @@ export class SigninComponent {
}

isLocalAuth(): boolean {
if (this.signinDomain && this.signinDomain.length > 0) {
if (this.domainAuthenticationEnabled && this.signinDomain && this.signinDomain.length > 0) {
return false;
}
return true;
Expand Down

0 comments on commit 3627921

Please sign in to comment.