Answer the question
In order to leave comments, you need to log in
How to use angular2-jwt?
Guys, tell me please.
There is such a thing as angular2-jwt . Is it possible to use this without including the dev library which is auth0 and their lock widget? Or is angular2jwt specifically designed to work for them? They didn’t ban me in Google, but I didn’t find an adequate use case without registering on the Auth0 service.
Maybe someone used and can throw off links to examples? Do they have everything here using the above?
Is there any other way to work with tokens in angular2?
Thanks
Answer the question
In order to leave comments, you need to log in
Is it possible to use this without including the developer library
import { tokenNotExpired, JWTHelper } from 'angular2-jwt';
const token = 'some jwt token';
const jwtHelper = new JWTHelper;
if (tokenNotExpired(token)) {
// everything ok
}
const payload = jwtHelper.decodeToken(token);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question