Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use client.decode_jwt(). #83

Open
HayatoSone opened this issue Oct 5, 2022 · 0 comments
Open

Can't use client.decode_jwt(). #83

HayatoSone opened this issue Oct 5, 2022 · 0 comments

Comments

@HayatoSone
Copy link

HayatoSone commented Oct 5, 2022

Bug Description

jwt.exceptions.DecodeError: It is required that you pass in a value for the "algorithms" argument when calling decode().

The argument name of "jwt.decode()" in "decode_jwt()" seems to be wrong.

ca = jwt.decode(token, base64.b64decode(secret), algorithms='HS256')

When we tried to run the above with the above modifications, the following additional error occurred

jwt.exceptions.InvalidAudienceError: Invalid audience

It was also necessary to specify the clientid in audience.
In the end, the following worked well!

ca = jwt.decode(token, base64.b64decode(secret), algorithms='HS256', audience="<merchant's client ID>")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant