Closed parkmap closed 3 years ago
Can you send me an example of your code. I don't understand why payload ('iat', 'nbf', 'exp') can't store int value.
I don't want to merge your PR because in RFC 7519 (https://tools.ietf.org/html/rfc7519)
The "iat" (issued at) claim [...]. Its value MUST be a number containing a NumericDate value. [...]
So I can't store String value to respect JWT norms.
My environment is Flutter 1.22.5
In debuging, passing dynamic Map(only String) to Sign.. cause Type problem.
dynamic type not work properly.
error case : final jwt = JWT( {"only":"String" } token = jwt.sign(SecretKey("$key"));
success case : final jwt = JWT( {"any int value": 1234, "with":"String" } token = jwt.sign(SecretKey("$key"));
Oh ! ok, I understand why its failed. I will patch this issue and update my lib soon.
Thanks you for reporting your errors.
_TypeError (type 'int' is not a subtype of type 'String' of 'value')
Sign with payload without int value, made error on type.