Token type?



  • Hi,
    I tried to validate a JWT access token issued by a FusionAuth server instance in Python with Simple JWT but got the error:

    rest_framework_simplejwt.exceptions.TokenError: Token has no type
    

    The library expects a key token_type (configurable) with a value of access in the token's payload but FusionAuth does not include such in its tokens. Does anyone have any idea what's wrong here?



  • I don't believe that is part of the spec but you can add arbitrary values to your tokens using a lambda so that's what I'd look at to get the JWT in the format the library expects.



  • Seems like the library I used is opinionated. Thanks for the hints.