puiterwijk / flask-oidc

OpenID Connect support for Flask
BSD 2-Clause "Simplified" License
154 stars 217 forks source link

flask-oidc expects the openid scope to be requested, but doesn't handle when it's not #30

Closed jeremycline closed 6 years ago

jeremycline commented 7 years ago

Flask-OIDC expects the id_token to not be None, but it will be None if the openid scope isn't requested.

No helpful exception is raised when this occurs (it results in a AttributeError since NoneType doesn't have get). It would be much better to explicitly handle the error and raise an exception notifying the developer of their error.