Skip to content

Instantly share code, notes, and snippets.

@blogcacanid
Created November 9, 2020 22:01
Show Gist options
  • Save blogcacanid/fdcb6a836a680db47a94414739766248 to your computer and use it in GitHub Desktop.
Save blogcacanid/fdcb6a836a680db47a94414739766248 to your computer and use it in GitHub Desktop.
profile.component.html Authentication JWT Angular 9 Lumen 7
<div class="container" *ngIf="currentUser; else loggedOut">
<header class="jumbotron">
<h3>Profile</h3>
<h3>
<strong>{{ currentUser.username }}</strong>
</h3>
<p>
<strong>Id:</strong>
{{ currentUser.id }}
</p>
<p>
<strong>Email:</strong>
{{ currentUser.email }}
</p>
<p>
<strong>Token:</strong>
{{ currentUser.accessToken.substring(0, 20) }} ...
{{ currentUser.accessToken.substr(currentUser.accessToken.length - 20) }}
</p>
</header>
</div>
<ng-template #loggedOut>
Please login.
</ng-template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment