Skip to content
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

fix: reply.jwtSign sets wrong exp #208

Merged
merged 1 commit into from
Dec 25, 2021

Conversation

maticjeras
Copy link
Contributor

When using reply.jwtSign without a callback convertTemporealProps gets called two times multiplying time props twice incorrectly.

  • move the check for the callback before the call to convertTemporalProps, so they are not called twice
  • add assertions checking token exp prop to existing time definitions tests

Closes #207

Checklist

move check for callback before call to convertTemporalProps

add assertions to existing time definitions tests
Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@climba03003 climba03003 merged commit c38b1bd into fastify:master Dec 25, 2021
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

Successfully merging this pull request may close these issues.

reply.jwtSign without callback and with expiresIn sets wrong exp in payload
3 participants