When attempting to utilize the JwtHelperService module in my service, I encountered the following error:
ERROR in node_modules/@auth0/angular-jwt/src/jwt.interceptor.d.ts(3,28): error TS2307: Cannot find module 'rxjs/internal/Observable'.
In my service, I have an isAuthenticated function defined.
import { JwtHelperService } from '@auth0/angular-jwt';
import * as jwt_decode from 'jwt-decode';
@Injectable()
export class MembershipService{
constructor(private http: Http,
private mainService: MainService,
public jwtHelper: JwtHelperService){}
public isAuthenticated(): boolean {
const token = localStorage.getItem('loggedToken');
// Check whether the token is expired and return true or false
return !this.jwtHelper.isTokenExpired(token);
}
}
Additionally, my Angular version happens to be 5.0
Your assistance on this matter would be greatly appreciated