Uncaught ValueError thrown when credentials_store is missing a key
gfinak opened this issue · 0 comments
gfinak commented
We are using flask-oidc 1.4.
There this bug occurs at lines 457-465.
When the credentials store has no key for id_token["sub"]
this throws an uncaught ValueError as line 443 returns None
.
flask-oidc/flask_oidc/__init__.py
Lines 438 to 448 in 7f16e27
Simply catching the error and redirecting solves the issue.
except ValueError:
logger.debug("Credentials missing", exc_info=True)
return self.redirect_to_auth_server(request.url)