-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tokenNotExpired() is not defined #369
Comments
I'm a bit confused by your mention of Under the hood, export function authHttpServiceFactory(http: Http, options: RequestOptions) {
return new AuthHttp(new AuthConfig({
tokenName: 'id_token'
}), http, options);
} |
@chenkie My problem solved by replacing the token. But anyhow I wondering why AUTH_PROVIDERS are not working from "angular-jwt" whereas we use exported function to resolve this problem. |
It has to do with functions being statically analyzable when the app is booted up. You can try using the |
Thank you for your quick help! |
After successful login, tokenNotExpired always returns false. So it doesn't redirect the secured page with angular guard.
But it showed me tokenNotExpired is not defined even though I have given reference using
import { tokenNotExpired } from 'angular2-jwt';
Any Idea pls?
NOTE: I manually passed stored localstorage token name to tokenNotExpired method. It resolves the problem but I don't think this is the right way!
The text was updated successfully, but these errors were encountered: