Skip to content

jti and iat overwritten during parse #4

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

Closed
WebWalks opened this issue Sep 3, 2015 · 2 comments
Closed

jti and iat overwritten during parse #4

WebWalks opened this issue Sep 3, 2015 · 2 comments

Comments

@WebWalks
Copy link

WebWalks commented Sep 3, 2015

When verifying a token the jti and iat are both overwritten with newer values (new id for jti and new time for iat)
I want to track tokens issued via their jti.

I temp hacked your code to

@WebWalks
Copy link
Author

WebWalks commented Sep 3, 2015

fix the issue by modifying the constructor of Jwt

this.body = new JwtBody(claims);
if (!this.body.jti) {
this.setJti(uuid.v4());
}
if (!this.body.iat) {
this.setIssuedAt(nowEpochSeconds());
}

not sure if thats the best solution, but works for me!

@hilkeheremans
Copy link

Yup, also having this issue.

robertjd added a commit that referenced this issue Oct 23, 2015
Fix: jti and iat overwritten during parse (#4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants