Closed tartale closed 7 years ago
I ran into the following error decoding a JWT on my system:
unable to decode base64 payload: illegal base64 data at input byte 264
Looks like it's related to the base64 decode function being used: https://github.com/robbert229/jwt/blob/master/algorithms.go#L94
If I switch the line to: payload, err := base64.RawURLEncoding.DecodeString(b64Payload)
payload, err := base64.RawURLEncoding.DecodeString(b64Payload)
then it works! I suspect all of the encoding/decoding needs to use this. Here's the RFC, for reference.
I ran into the following error decoding a JWT on my system:
unable to decode base64 payload: illegal base64 data at input byte 264
Looks like it's related to the base64 decode function being used: https://github.com/robbert229/jwt/blob/master/algorithms.go#L94
If I switch the line to:
payload, err := base64.RawURLEncoding.DecodeString(b64Payload)
then it works! I suspect all of the encoding/decoding needs to use this. Here's the RFC, for reference.