According to the [jwt doc](https://jwt.io/introduction/), the encoding should be base64url, not base64 which is used in this library.