Skip to content

fix: validation error with iat #103

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

kimzuni
Copy link

@kimzuni kimzuni commented Jun 27, 2025

Fixes #98

This also fixes a validation error with iat that occurred when setting the schema.

Also,

If the payload returned from jwtVerify includes exp or nbf, those values are generally expected to be numbers—just like iat.

Since the payload type used in jwt or jwt.sign is defined separately, and the validator exists purely for validation, wouldn't it make sense to set the exp and nbf fields in the validator schema to number?

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.

verify fails when using schema in Elysia JWT plugin
1 participant