FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Token type?

    Scheduled Pinned Locked Moved Q&A
    jwtaccess tokenspythonfusionauth
    3 Posts 2 Posters 9.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      AliMirlou
      last edited by

      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?

      1 Reply Last reply
      Reply Quote 0
      • danD
        dan
        last edited by

        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.

        --
        FusionAuth - Identity Without Constraints
        https://fusionauth.io

        1 Reply Last reply
        Reply Quote 1
        • A
          AliMirlou
          last edited by

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

          1 Reply Last reply
          Reply Quote 0
          • danD dan moved this topic from Q&A on
          • danD dan moved this topic from Frequently Asked Questions (FAQ) on

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post