You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @mkoorn!.
Do you have a JWT that you can send me so I can see what's wrong and also create a test for that case?.
I can use that library as a dependency but I want to keep JWTDecode simple and without external dependencies.
Hi @hzalaz
for example this one:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1M2VjNjdkODI1NDIyMzE3MDAzNGYxNzciLCJlbWFpbCI6Im15ZW1haWxAZ21haWwuY29tIiwicHJvZmlsZV9waWN0dXJlIjoiaHR0cDovL2Nkbi51YnVidWJ0ZXN0ZXIuaW8vN2Q4MjU0MjIzMTcwMDM0ZjE3Ny5wbmc_dD0xNDEzNDQyMTI4OTAwIiwiaWF0IjoxNDEzNDcyNzUyfQ.WEELiFZqavfxPcnZ7vz44gbPMbEc0xeCaaS53btTYXY
Some JTW payloads could not be decoded and failed with this error.
This occurred in payloads which included an url. (not all url's failed)
I was able to fix this with this lib:https://github.com/qmihara/QMBase64URLSafe
and replacing:
NSData *claimsData = [[NSData alloc] initWithBase64EncodedString:claimsBase64 options:NSDataBase64DecodingIgnoreUnknownCharacters];
with:
NSData *claimsData = [[NSData alloc] qm_initWithBase64URLSafeEncodedString:claimsBase64 options:NSDataBase64DecodingIgnoreUnknownCharacters];
The text was updated successfully, but these errors were encountered: