add feedbacks on steam logout

This commit is contained in:
MathieuG-P
2022-07-07 23:57:17 +02:00
parent 20e7d3be85
commit 281f88deb1
3 changed files with 28 additions and 12 deletions
@@ -1,3 +1,5 @@
import { Observable } from "rxjs";
import { map } from "rxjs/operators";
import { ConfigurationService } from "./configuration.service";
export class AuthUserService {
@@ -22,6 +24,10 @@ export class AuthUserService {
return !!this.configService.get(this.STEAM_USERNAME_KEY);
}
public get sessionExist$(): Observable<boolean>{
return this.configService.watch(this.STEAM_USERNAME_KEY).pipe(map(v => !!v));
}
public setSteamSession(username: string, stay = true): void{
this.configService.set(this.STEAM_USERNAME_KEY, username, stay);
}