JWTDecode.swift icon indicating copy to clipboard operation
JWTDecode.swift copied to clipboard

Claim.integer returns nil when value is 0 or 1

Open knine79 opened this issue 3 years ago • 1 comments

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. 스크린샷 2023-01-13 오후 6 50 08

Reproduction

I added some tests like below: 스크린샷 2023-01-13 오후 6 45 17 And they are failed.

JWTDecode.swift version

3.0.0

Platform

macOS

Platform version(s)

13.1

Xcode version

14.2

Package manager

SPM

knine79 avatar Jan 13 '23 09:01 knine79

Hi @knine79, thanks for reporting this! The fix is out now in v3.0.1.

Widcket avatar Jan 24 '23 19:01 Widcket