# Decode() missing 1 required positional argument: 'key'

**URL:** <https://community.auth0.com/t/decode-missing-1-required-positional-argument-key/56751>\
**Category:** Get Help\
**Tags:** decoding, django, jwt, login\
**Created:** [January 25, 2021, 3:01pm UTC](https://community.auth0.com/t/decode-missing-1-required-positional-argument-key/56751 "2021-01-25T15:01:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![adhingafredrick](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adhingafredrick/32/27166_2.png) [@adhingafredrick](https://community.auth0.com/u/adhingafredrick)\
**Post date:** [January 25, 2021, 3:01pm UTC](https://community.auth0.com/t/decode-missing-1-required-positional-argument-key/56751/1 "2021-01-25T15:01:03Z")

</div>

I have a problem with my login authentication using jwt in Django  
here’s is the code

views.py

> Blockquote  
> def Home(request):

token = request.session[‘id\_token’]

```
userinfo = jwt.decode(token, options={"verify_signature":False})

    employee_list = Employee.objects.get(Email_Address=userinfo['email'])
    indent preformatted text by 4 spaces
    # print(request.get_host())

    return render(request, 'LMS/Home.html',

                  {'employees': employee_list, 'role': userinfo[settings.METADATA_NAMESPACE + 'app_metadata']['role']})

```

> Blockquote

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 25, 2021, 8:33pm UTC](https://community.auth0.com/t/decode-missing-1-required-positional-argument-key/56751/3 "2021-01-25T20:33:36Z")

</div>

Hi @adhingafredrick,

Welcome to the Community!

What library are you using?

---

<div class="post-metadata">

**Author:** ![adhingafredrick](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adhingafredrick/32/27166_2.png) [@adhingafredrick](https://community.auth0.com/u/adhingafredrick)\
**Post date:** [February 4, 2021, 8:07am UTC](https://community.auth0.com/t/decode-missing-1-required-positional-argument-key/56751/4 "2021-02-04T08:07:25Z")

</div>

hi, sorry for the late reply.  
I used jose-jwt

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [February 4, 2021, 6:17pm UTC](https://community.auth0.com/t/decode-missing-1-required-positional-argument-key/56751/5 "2021-02-04T18:17:23Z")

</div>

Do you mean [python-jose](https://pypi.org/project/python-jose/)?

---

<div class="post-metadata">

**Author:** ![adhingafredrick](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adhingafredrick/32/27166_2.png) [@adhingafredrick](https://community.auth0.com/u/adhingafredrick)\
**Post date:** [February 4, 2021, 9:35pm UTC](https://community.auth0.com/t/decode-missing-1-required-positional-argument-key/56751/6 "2021-02-04T21:35:32Z")

</div>

yes python-jose library

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [February 5, 2021, 9:09pm UTC](https://community.auth0.com/t/decode-missing-1-required-positional-argument-key/56751/7 "2021-02-05T21:09:50Z")

</div>

It looks like you aren’t the only one. There must not be a way to decode a token with python-jose without verifying it.

[https://github.com/mpdavis/python-jose/issues/206](https://github.com/mpdavis/python-jose/issues/206)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 27, 2021, 9:07pm UTC](https://community.auth0.com/t/decode-missing-1-required-positional-argument-key/56751/8 "2021-04-27T21:07:37Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
