I have a angular 4 application. There i use JWT token for authentication purposes. Everything works fine. but the token expiration time i have given to the JWT token is 1 hour.
There is tokenNotExpired method in angular2-jwt you can use that to check the token expiration
Give try on this
authHttpGet(URL: string): Observable { if (!tokenNotExpired('id_token')) { this._route.navigate(['login']); } }