JWTDecode.swift
JWTDecode.swift copied to clipboard
Claim.integer returns nil when value is 0 or 1
Checklist
- [X] I have looked into the README and have not found a suitable solution or answer.
- [X] I have searched the issues and have not found a suitable solution or answer.
- [X] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- [X] I agree to the terms within the Auth0 Code of Conduct.
Description
There is an issue when JWT token include integer value of 1.
Then Claim.integer below returns nil because of self.boolean is not nil.

Reproduction
I added some tests like below:
And they are failed.
JWTDecode.swift version
3.0.0
Platform
macOS
Platform version(s)
13.1
Xcode version
14.2
Package manager
SPM
Hi @knine79, thanks for reporting this! The fix is out now in v3.0.1.