We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1ebe0e7 + e55d7aa commit 1132575Copy full SHA for 1132575
1 file changed
complete-application/src/app/app.component.ts
@@ -17,11 +17,9 @@ export class AppComponent {
17
18
constructor() {
19
this.isLoggedIn = this.fusionAuthService.isLoggedIn();
20
- this.userInfo$ = fromPromise(this.fusionAuthService.getUserInfo());
21
-
22
- this.fusionAuthService.getUserInfo().then(userInfo => {
23
- console.log(userInfo);
24
- })
+ this.userInfo$ = this.isLoggedIn
+ ? fromPromise(this.fusionAuthService.getUserInfo())
+ : new Observable<UserInfo>();
25
}
26
27
logout() {
0 commit comments