Closed lvh closed 11 years ago
It looks like the base library we are using (rauth) has made some changes. I'll look into getting Flask-Rauth up to speed with these changes. In the mean time, use commit 3eedd3a5 verision 0.4.16 of rauth. You can install this version using pip:
# uninstall the newer version
pip uninstall rauth
# install the last-known-good version
pip install rauth==0.4.16
The mixin's constructor must be called first, so that self.app
is established... since the mixin turns self.consumer_key
and self.consumer_secret
into properties (which touch self.app
).
When using the current PyPI release of flask-rauth, I get the following exception:
The required keys are in
app.config
, but this is never read, becauseself.app
is set inRauthServiceMixin.__init__
:https://github.com/joelverhagen/flask-rauth/blob/master/flask_rauth.py#L155
Which is called after
OAuth2Service.__init__
:https://github.com/joelverhagen/flask-rauth/blob/master/flask_rauth.py#L270
So I get the exception raised here:
https://github.com/joelverhagen/flask-rauth/blob/master/flask_rauth.py#L213
....
I worked around this issue by specifying these values when creating the object instead of putting them in the config, but the documentation suggests that isn't recommended. Anyway, I think the current_app using line isn't actually ever used, since the only case where it'd be used is when self.app isn't set yet...