Shopify / shopify-api-ruby

ShopifyAPI is a lightweight gem for accessing the Shopify admin REST and GraphQL web services.
MIT License
1.05k stars 468 forks source link

Use same leeway for `exp` and `nbf` when parsing JWT #1312

Closed rachel-carvalho closed 5 months ago

rachel-carvalho commented 5 months ago

Description

Right now we specify a leeway of 10 seconds when validating JWT payload expiration, but no leeway for nbf (not valid before). The shopify-api JS library does allow for clockTolerance in both fields, and I think it makes sense for the Ruby gem to do the same.

How has this been tested?

I added unit tests.

Checklist: