update can redirect back to what they came from after login

This commit is contained in:
Kenta420 2023-10-05 13:56:04 +07:00
parent 1f4f5b6ad2
commit a12b30998d
3 changed files with 57 additions and 14 deletions

View file

@ -19,7 +19,12 @@ export class UserService {
.asObservable()
.pipe(distinctUntilChanged());
public isAuthenticated = this.currentUser.pipe(map((user) => !!user));
public isAuthenticated = this.currentUser.pipe(
map((user) => !!user),
tap((isAuth) => {
console.log('Change auth', isAuth);
})
);
constructor(
private readonly http: HttpClient,