Skip to content

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

@HayatoSone

Description

@HayatoSone

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>") 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions