bytesbay / web3-token

Web3 Token is a new way to authenticate users in a hybrid dApps using signed messages. Implementation of EIP-4361.
380 stars 50 forks source link

Expiration fields not match between sign and verify function. #17

Closed AtelyPham closed 2 years ago

AtelyPham commented 2 years ago

The expiration fields in the sign function is expiration-time, but in the verify function, you are checking the expiration-date field.

Link code:

bytesbay commented 2 years ago

That's because of a body parser. But agree that it's not good

AtelyPham commented 2 years ago

But it didn't work for the expired token, the error line below cannot reach.

https://github.com/bytesbay/web3-token/blob/main/src/lib/verify/verify.js#L80