Skip to content

Commit

Permalink
fix: jwt lib changed
Browse files Browse the repository at this point in the history
* pyjwt 2.10.0 changed the api to decode. verify-sub is now default.
  this change reinstates the old behavior
  • Loading branch information
utnapischtim committed Nov 28, 2024
1 parent 1421f3c commit e800ece
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions invenio_accounts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This file is part of Invenio.
# Copyright (C) 2017-2024 CERN.
# Copyright (C) 2024 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -105,6 +106,7 @@ def jwt_decode_token(token):
return decode(
token,
current_app.config["ACCOUNTS_JWT_SECRET_KEY"],
options={"verify_sub": False},
algorithms=[current_app.config["ACCOUNTS_JWT_ALOGORITHM"]],
)
except DecodeError as exc:
Expand Down

0 comments on commit e800ece

Please sign in to comment.