Node-jsonwebtoken: JsonWebTokenError: 'invalid exp value'

Created on 10 Jan 2017  路  2Comments  路  Source: auth0/node-jsonwebtoken

I'm get this error: name: 'JsonWebTokenError', message: 'invalid exp value'
but I think my token is ok (decoded): { exp: '1484048026', password: 'aaaaaaaa', iat: 1484047996 }
What's wrong? Please help.

Most helpful comment

Hi @scippio! the claims exp, nbf and iat must be numbers. In your exp claim you can see how the number is inside a string.

ok => exp: 1484048026
invalid => exp: '1484048026'

All 2 comments

Hi @scippio! the claims exp, nbf and iat must be numbers. In your exp claim you can see how the number is inside a string.

ok => exp: 1484048026
invalid => exp: '1484048026'

Thanks, I thought it :)

Was this page helpful?
0 / 5 - 0 ratings