Fix some login stuff

This commit is contained in:
2025-07-21 16:41:17 -07:00
parent dbc4d973f9
commit c87ef1cfc2
2 changed files with 2 additions and 1 deletions
@@ -23,7 +23,7 @@ export class LogoutComponent {
ngAfterViewInit(){ ngAfterViewInit(){
this.auth.Logout().subscribe({ this.auth.Logout().subscribe({
next: data => { next: data => {
this.router.navigate(["/"]); window.location.href = "";
} }
}); });
} }
@@ -24,6 +24,7 @@ export class Authentication{
let sub = this.http.post<Account>( "api/account/login", body, { headers } ); let sub = this.http.post<Account>( "api/account/login", body, { headers } );
sub.subscribe({ sub.subscribe({
next: data => { next: data => {
data.passwordHash = "";
this._user.next(data); this._user.next(data);
this.setUserToStorage(data, StayLoggedIn == true ? SessionType.Forever : SessionType.Session); this.setUserToStorage(data, StayLoggedIn == true ? SessionType.Forever : SessionType.Session);
}, },