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

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

Hi @adhingafredrick,

Welcome to the Community!

What library are you using?

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

Do you mean python-jose?

yes python-jose library

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

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