Setup login page for public use

This commit is contained in:
2025-07-29 18:03:52 -07:00
parent f9f8dc726a
commit 2798b6472d
@@ -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 ];
} }
}) });
} }
} }