Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jwt.exceptions.DecodeError: It is required that you pass in a value for the "algorithms" argument when calling decode(). #1

Open
SergiiGlad opened this issue Feb 24, 2021 · 1 comment

Comments

@SergiiGlad
Copy link

Hello Tyler,
I need your workaround to uptime check App Engine Service behind IAP
I run code and get error
gcp-oidc-proxytk2idrvyc0m9 Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise raise value File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functionsrule.endpoint File "/layers/google.python.pip/pip/lib/python3.8/site-packages/functions_framework/init.py", line 70, in view_func return function(request._get_current_object()) File "/workspace/main.py", line 54, in decorated return f(*args, **kwargs) File "/workspace/main.py", line 99, in handle_request _oidc_token = _get_google_oidc_token() File "/workspace/main.py", line 159, in _get_google_oidc_token return OIDCToken(token_response['id_token']) File "/workspace/main.py", line 62, in init self._claims = jwt.decode(token_str, verify=False) File "/layers/google.python.pip/pip/lib/python3.8/site-packages/jwt/api_jwt.py", line 113, in decode decoded = self.decode_complete(jwt, key, algorithms, options, **kwargs) File "/layers/google.python.pip/pip/lib/python3.8/site-packages/jwt/api_jwt.py", line 79, in decode_complete raise DecodeError( jwt.exceptions.DecodeError: It is required that you pass in a value for the "algorithms" argument when calling decode().

Could you please help with?

@ghost
Copy link

ghost commented Apr 16, 2021

https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst#dropped-deprecated-verify-param-in-jwtdecode

Set the pyjwt to a specific version in the requirements.txt pyjwt==1.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant