You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It returns JWTs with fractional datetimes, which is maybe a bit unconventional, but is explicitly supported as part of the JWT RFC here (see NumericDate)
non-integer values can be represented.
Here's a test jwt with fractional numeric dates, the dates are parsed properly by https://jwt.io for example.
main = do
Just jwt <- JWT.decode accessToken
now <- getPOSIXTime
Just expDate <- JWT.exp (JWT.claims jwt)
print (JWT.secondsSinceEpoch expDate)
The resulting time is several thousand years in the future, as though the decoder is treating the float as an int or something like that. Would be great if this could be fixed, otherwise apps will mis-interpret expired tokens as being valid.
The text was updated successfully, but these errors were encountered:
Hi 👋🏼 , thanks for the library!
I'm using this library on the server: https://hackage.haskell.org/package/jose-0.10/docs/Crypto-JWT.html
It returns JWTs with fractional datetimes, which is maybe a bit unconventional, but is explicitly supported as part of the JWT RFC here (see NumericDate)
Here's a test jwt with fractional numeric dates, the dates are parsed properly by https://jwt.io for example.
However, when decoding like this:
The resulting time is several thousand years in the future, as though the decoder is treating the float as an int or something like that. Would be great if this could be fixed, otherwise apps will mis-interpret expired tokens as being valid.
The text was updated successfully, but these errors were encountered: