Fix some login stuff
This commit is contained in:
@@ -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);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user