ecency / hivesigner-sdk

Hivesigner SDK
https://hivesigner.com
MIT License
2 stars 1 forks source link

Problem decoding returned access token / JWT #11

Closed shawnlauzon closed 3 years ago

shawnlauzon commented 3 years ago

I'm having a problem decoding the JWT returned as the access token on the server. The error I get with the Ruby library is JWT::DecodeError (Not enough or too many segments). However, this can be verified with any online page which verifies a jwt, e.g. https://jwt.io/

image

Can see the payload is "": image

If I simply change the payload from "" to '{}`, then both my code and https://jwt.io decode the token nicely.

I have no workaround for this, so a workout would be accepted while this is being resolved. Thank you.

feruzm commented 3 years ago

Did you try decoding access token like this? https://www.base64decode.net/ruby-base64-decode64

shawnlauzon commented 3 years ago

Ahh, that works much better. Thank you!