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

OAuth2 Providers cannot make request in Flask, if the request.args Dict is not empty #102

Open
SuryaSankar opened this issue May 13, 2015 · 0 comments

Comments

@SuryaSankar
Copy link

Issue observed in Flask. Could be present in other frameworks too.
Basically, in my Flask login view, I use the argument called next, to let me do things like, login?next=something. So request.args is not empty. While using authomatic.login, I create a Werkzeug adapter by passing the flask request global and a response object. Now since this request object has the args dict set, it in turn results in the adapter.params being set.

In providers/oauth2.py's login function, PHASE 1 of Oauth2 flow happens only if self.params is not set ( which in turn is assigned from adapter.params ). Since it was set in this case, the if condition in l.no 383 is never entered and the query is not made at all.
I am not sure if there is any way to clear request.args ( short of reassigning it to an empty object, which I dont want to do as I dont know what side effects that would cause ). So effectively, I am unable to use authomatic in this scenario, which is likely to be quite common.

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

No branches or pull requests

2 participants