poetapp / poet-js

Po.et JS is an small library that provides methods to easily create and sign Po.et Claims.
https://www.npmjs.com/package/@po.et/poet-js
MIT License
52 stars 4 forks source link

Poetjs signature verification fails if the created date is too far in the past #183

Closed krobi64 closed 6 years ago

krobi64 commented 6 years ago

I tracked this down while trying to debug integration tests in poet-node. I believe the default time validation that occurs while verifying a signature only allows a window of time in which it will return true. We obviously need to change that.

I believe the best way to do it is to anchor to a reasonable amount of time to the issuanceDate of the claim. These two events should occur within a couple of minutes. (most likely less)

Another way to solve this would be to turn off any time check in the verification algorithm. The option either can be set to false to turn time checking off, or to a function to override the default behavior.

poet-ci commented 6 years ago

:tada: This issue has been resolved in version 5.0.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: