0
votes

Hey guys would really appreciate some help , I was doing this tutorial from Auth0: https://auth0.com/blog/angular-2-authentication/ It's regarding authentication with Angular 2. and my code is exactly the same as the repo but I keep getting this error: error-message

My Github repo for this project is the following: on Github: lechiffre10/angular2auth ( stack overflow won't let me post a second link)

I removed the auth0 client id from auth.service.ts and from the server side as well but I'm running out of ideas as to what the issue could be would really appreciate some help! Thank you!

1
Javascript does care about case sensitivity... - Harry Ninh

1 Answers

0
votes

Found your problem. Like Harry said, you have a case issue.

The function is loggedIn(){ }

In your app.component.ts file you have

html <li> <a (click)=authService.logout() *ngIf="authService.LoggedIn()">Log Out</a> </li>

change it to this: html <li> <a (click)=authService.logout() *ngIf="authService.loggedIn()">Log Out</a> </li>

and you should be good to go! :)