No JWT present or has expired after upgrading to Angular4
See original GitHub issueHi, I am getting this error after updating from Angular 2 to 4 and I am using the latest angular2-jwt
AuthHttpError {__zone_symbol__error: Error: No JWT present or has expired
at AuthHttpError.ZoneAwareError (http://localhost:3000/poly……}
I found this issue but even if I comment out the getter function I still get this error.
export function AuthFactory(http: Http, options: RequestOptions) {
return new AuthHttp(new AuthConfig({
// tokenName: 'id_token',
// tokenGetter: (() => localStorage.getItem('id_token')),
globalHeaders: [{ 'Content-Type': 'application/json' }],
}), http, options);
};
Any idea why I am getting this error?
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (1 by maintainers)
Top Results From Across the Web
Angular2-jwt, getting empty errors in GET/POST responses ...
There is no "No JWT present or has expired" error text, nothing. By the way, standard Http Class is working normally. And so...
Read more >Auth http: No JWT present or has expired - Auth0 Community
When I'm trying to make an api call I get the response 401 (Unauthorized): No JWT present or has expired. in my app.module.ts,...
Read more >Check if JWT token is expired using Angular JWT library
Video 40 | Check if JWT token is expired using Angular JWT library ; Playlist: https://www.youtube.com/watch?v=rcq4S... ; Install angular2- jwt : ...
Read more >Tutorial | Spring Security and Angular
In this tutorial we show some nice features of Spring Security, Spring Boot and Angular working together to provide a pleasant and secure...
Read more >@auth0/angular-jwt - npm
Those details will vary depending on your setup, but in most cases, you will use a regular HTTP request to authenticate your users...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks! For everyone else getting this error:
angular2-jwt 0.1.28 + Angular 2.x = working angular2-jwt 0.1.28 + Angular 4.x = working angular2-jwt 0.2.0 + Angular 4.x = working angular2-jwt 0.2.1 + Angular 4.x = not working angular2-jwt 0.2.2 + Angular 4.x = not working angular2-jwt 0.2.3 + Angular 4.x = not working
How do you fix this issue?