Setup login page for public use
This commit is contained in:
@@ -43,13 +43,14 @@ export class LoginComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.errorMsgs.push("Waiting for response from server");
|
this.errorMsgs.push("Waiting for response from server");
|
||||||
this.auth.Login(this.UserName, this.Password, this.StayLoggedIn).subscribe({
|
this.http.post( "https://auth.mistox.com/api/auth/login", { "UserName": this.UserName, "Password": this.Password, "StayLoggedIn": this.StayLoggedIn }, { responseType: 'text' } ).subscribe({
|
||||||
next: data => {
|
next: data => {
|
||||||
this.router.navigate([this.returnURL]);
|
this.errorMsgs = [ "Login Token: " + data ];
|
||||||
|
window.location.href = this.returnURL + "?LoginToken=" + data;
|
||||||
},
|
},
|
||||||
error: err => {
|
error: err => {
|
||||||
this.errorMsgs = [ err.error ];
|
this.errorMsgs = [ err.error ];
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user