# Angular and Auth0 \*ngIf="(auth.isAuthenticated$ | async) undefined

**URL:** <https://community.auth0.com/t/angular-and-auth0-ngif-auth-isauthenticated-async-undefined/60207>\
**Category:** Get Help\
**Tags:** login\
**Created:** [March 28, 2021, 6:26pm UTC](https://community.auth0.com/t/angular-and-auth0-ngif-auth-isauthenticated-async-undefined/60207 "2021-03-28T18:26:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DoNotPanik](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/donotpanik/32/28433_2.png) [@DoNotPanik](https://community.auth0.com/u/DoNotPanik)\
**Post date:** [March 28, 2021, 6:26pm UTC](https://community.auth0.com/t/angular-and-auth0-ngif-auth-isauthenticated-async-undefined/60207/1 "2021-03-28T18:26:11Z")

</div>

I need help,  
It is strange but \*ngIf="(auth.isAuthenticated$ | async) is undefined although I can see the Observable in the console log. Application is set to a single page app on the Auth0 side. And I can see that the user successfully authenticated. However I unable to pull the user profile.  
I followed all the steps in this tutorial:  
[The Complete Guide to Angular User Authentication with Auth0](https://auth0.com/blog/complete-guide-to-angular-user-authentication/)

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [March 29, 2021, 2:17pm UTC](https://community.auth0.com/t/angular-and-auth0-ngif-auth-isauthenticated-async-undefined/60207/3 "2021-03-29T14:17:08Z")

</div>

Hi @DoNotPanik,

Welcome to the Community!

Have you tried getting the user profile info by using `*ngIf="auth.user$ | async as user"`?

Here is an example from the [Angular Quickstart](https://auth0.com/docs/quickstart/spa/angular/01-login) (`src/app/pages/profile/profile.component.html`):

```auto
<div class="container mt-5" *ngIf="auth.user$ | async as user">
  <div
    class="row align-items-center profile-header mb-5 text-center text-md-left"
  >
    <div class="col-md-2">
      <img
        [src]="user.picture"
        class="rounded-circle img-fluid profile-picture mb-3 mb-md-0"
      />
    </div>
    <div class="col-md">
      <h2>{{ user.name }}</h2>
      <p class="lead text-muted">{{ user.email }}</p>
    </div>
  </div>

  <div class="row" *ngIf="profileJson">
    <pre
      class="rounded"
    ><code class="json" [highlight]="profileJson"></code></pre>
  </div>
</div>

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 13, 2021, 2:17pm UTC](https://community.auth0.com/t/angular-and-auth0-ngif-auth-isauthenticated-async-undefined/60207/4 "2021-04-13T14:17:56Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
