Closed sweetcoco closed 8 years ago
Ignore this ticket. There is no need to decode on the front end and the server. just the server. Sorry!
I'd still like to get to the bottom of the problem so this doesn't affect others in the future. Are you able to supply me with an example JWT so I can debug this further?
Which iPhone model were you using?
I am wondering if it is just the iPhones date is set slightly behind the server and when you validate an issued token on the device you receive this validation error.
The problem was this: I was creating the JWT on my localhost server, and then validating it on my iphone 6. my iphone's time was about 30seconds ahead of the server's time, so It was invaliding the jwt. I had to move my server time up a minute to get it working.
There is no reason to decode jwt's in an app though. at least as far as i can see, so simply dropping that fixed my issue.
HI I've got the same "Issued at claim (iat) is in the future" error message when decoding. Is there any way to fix this without change server time? @kylef
I could benefit from what @aldocyanlabs asked too since I don't have access some web features at my job. @kylef
If I run my app in the Simulator I receive no errors and JSONWebToken decodes the server's JWT with no problem (node server is running on my localhost). However, when i run the app on my iPhone i get the error "Issued at claim (iat) is in the future". I've been troubleshooting for a couple hours now, I updated by CryptoSwift and JSONWebToken with no luck. Any ideas?