{"action":"opened","issue":{"url":"https://api.github.com/repos/auth0/JWTDecode.swift/issues/65","repository_url":"https://api.github.com/repos/auth0/JWTDecode.swift","labels_url":"https://api.github.com/repos/auth0/JWTDecode.swift/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/auth0/JWTDecode.swift/issues/65/comments","events_url":"https://api.github.com/repos/auth0/JWTDecode.swift/issues/65/events","html_url":"https://github.com/auth0/JWTDecode.swift/issues/65","id":313813529,"number":65,"title":"Claims value nil, but payload seems fine","user":{"login":"DeathByEnnui","id":36737557,"avatar_url":"https://avatars2.githubusercontent.com/u/36737557?v=4","gravatar_id":"","url":"https://api.github.com/users/DeathByEnnui","html_url":"https://github.com/DeathByEnnui","followers_url":"https://api.github.com/users/DeathByEnnui/followers","following_url":"https://api.github.com/users/DeathByEnnui/following{/other_user}","gists_url":"https://api.github.com/users/DeathByEnnui/gists{/gist_id}","starred_url":"https://api.github.com/users/DeathByEnnui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeathByEnnui/subscriptions","organizations_url":"https://api.github.com/users/DeathByEnnui/orgs","repos_url":"https://api.github.com/users/DeathByEnnui/repos","events_url":"https://api.github.com/users/DeathByEnnui/events{/privacy}","received_events_url":"https://api.github.com/users/DeathByEnnui/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-12T17:07:13Z","updated_at":"2018-04-12T17:07:13Z","closed_at":null,"author_association":"NONE","body":"I can print out my idToken, cut and paste it into https://jwt.io and I see all my payload data, but when I try to use JWTDecode I'm getting all nil values for my claims.\r\n\r\n```\r\n        do {\r\n            let jwt = try decode(jwt: idToken)\r\n\r\n            let lastNameClaim = jwt.claim(name: \"lastName\")\r\n            if let lastName = lastNameClaim.string {\r\n                print(\"Last name in jwt was \\(lastName)\")\r\n            }\r\n\r\n            let claim = jwt.claim(name: \"userID\")\r\n            if let email = claim.string {\r\n                print(\"Email in jwt was \\(email)\")\r\n            }\r\n        } catch {\r\n            print(\"JWT fail: \\(error.localizedDescription)\")\r\n        }\r\n```\r\n\r\nNothing prints and I stick a breakpoint into the debugger I see the claim.value is nil. Here is an example ID token (signature removed for smaller sizing)\r\n\r\n```\r\neyJraWQiOiIyMTIiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdF9oYXNoIjoicVpxOXRLN0dWME81ZFZnQWtGSVpYdyIsInN1YiI6Imh0dHBzOi8vdGVzdC5zYWxlc2ZvcmNlLmNvbS9pZC8wMEQyNTAwMDAwMERxU2NFQUsvMDA1MjUwMDAwMDJ1M29vQUFBIiwiYXVkIjoiM01WRzlyS2hUOG9jb3hHazFFbkZLVGZ2TXZjRV9xQy5hMEQ5S0VpR2VOQmJiaHRHd2h1c2VfWjRENlAuN1pfRnVWMEFjWFRfakhYeVFDc2lOOUk0aCIsImlzcyI6Imh0dHBzOi8vdGVzdC1tdGwuY3M4MC5mb3JjZS5jb20vIiwiZXhwIjoxNTIzNTUyMDYxLCJpYXQiOjE1MjM1NTE5NDEsImN1c3RvbV9hdHRyaWJ1dGVzIjp7Imxhc3ROYW1lIjoiTWFjayIsImZpcnN0TmFtZSI6IkRhdmlkIiwiZmVkZXJhdGlvbklEIjoiRkVELTAwMTM3NzU4NDIiLCJ1c2VySUQiOiJkYXZpZC5tYWNrQHRldmFwaGFybS5jb20ifX0\r\n```\r\n\r\nAny help appreciated."}}
{"actor":{"display_login":"DeathByEnnui"}}