Documentation mentions the parameter :exp_leeway. However, in practice, :leeway seems to be what works.
I have an expired token.
JWT.decode token2, key, true, { :exp_leeway => 1000, :algorithm => 'HS256' } # JWT::ExpiredSignature: Signature has expired
JWT.decode token2, key, true, { :leeway => 1000, :algorithm => 'HS256' } # decodes fine.
Content of my token: [{"exp"=>1501054718, "iat"=>1501053518, "nbf"=>1501053513, "account_id"=>1193 }]
Documentation mentions the parameter :exp_leeway. However, in practice, :leeway seems to be what works.
I have an expired token.
Content of my token:
[{"exp"=>1501054718, "iat"=>1501053518, "nbf"=>1501053513, "account_id"=>1193 }]