Fix some login stuff
This commit is contained in:
@@ -23,7 +23,7 @@ export class LogoutComponent {
|
||||
ngAfterViewInit(){
|
||||
this.auth.Logout().subscribe({
|
||||
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 } );
|
||||
sub.subscribe({
|
||||
next: data => {
|
||||
data.passwordHash = "";
|
||||
this._user.next(data);
|
||||
this.setUserToStorage(data, StayLoggedIn == true ? SessionType.Forever : SessionType.Session);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user