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

release 1.2.0 forces oauthlib-3.0.0 which breaks Flask-OAuthlib #359

Closed
robnagler opened this issue Jan 15, 2019 · 6 comments
Closed

release 1.2.0 forces oauthlib-3.0.0 which breaks Flask-OAuthlib #359

robnagler opened this issue Jan 15, 2019 · 6 comments

Comments

@robnagler
Copy link

I just did normal pip install and got a conflict. Flask-OAuthlib request < oauthlib-3.0.0.

Since 1.2.0 is a minor release, it would seem like a bad idea to force a change to a major release of oauthlib.

robnagler pushed a commit to radiasoft/sirepo that referenced this issue Jan 15, 2019
Flask-OAuthlib and reqeusts-oauthlib version incompatibility
@ivanpricewaycom
Copy link

we have a project that connects to Salesforce's streaming API which was broken by this also. pinning requests-oauthlib to 1.1.0 'fixes' the problem.

@singingwolfboy
Copy link
Member

I apologize for the problems you've been having. I was following @jvanasco's advice provided here -- he has the most context around this change.

Regardless, requests-oauthlib 1.2.0 has been tagged and published, and trying to revert or remove the release seems like it would cause more harm than good. If anyone has other practical suggestions for how to resolve this issue, I'm open to hearing them.

@jvanasco
Copy link
Contributor

jvanasco commented Jan 17, 2019 via email

@singingwolfboy
Copy link
Member

It appears that Flask-OAuthlib has already changed their dependencies to avoid this problem.

I should also mention that Flask-Dance also does OAuth with Flask, and it is compatible with oauthlib 3.0. Personally, I prefer Flask-Dance over Flask-OAuthlib -- but then, I'm the author of Flask-Dance, so I'm biased. 😄

@ivanpricewaycom
Copy link

no need to apologise!

I include our stacktrace here for what it's worth (not much maybe). I didn't spend any time debugging this, as it was clearly a dependency problem.. its easy for us to test if you come up with any fixes.

For info we use requests-oauth because it comes with this project:

https://github.com/SalesforceFoundation/salesforce-requests-oauthlib

Their current dependency on you is:
https://github.com/SalesforceFoundation/salesforce-requests-oauthlib/blob/master/setup.py

('requests-oauthlib>=0.6.2',)

so they are now broken. we run a customised version of that library.

cheers !!

2019-01-17 12:32:07,973 ERROR Traceback (most recent call last):
  File "/usr/src/app/customer/management/commands/listen_salesforce_stream.py", line 48, in handle
    do_blocking_client()
  File "/usr/src/app/customer/management/commands/listen_salesforce_stream.py", line 69, in do_blocking_client
    with ClientOne(*args, **kwargs) as streaming_client:
  File "/usr/local/lib/python3.6/site-packages/salesforce_streaming_client/__init__.py", line 141, in __init__
    version=version
  File "/usr/local/lib/python3.6/site-packages/salesforce_requests_oauthlib/__init__.py", line 152, in __init__
    self.launch_password_flow()
  File "/usr/local/lib/python3.6/site-packages/salesforce_requests_oauthlib/__init__.py", line 223, in launch_password_flow
    password=self.password
  File "/usr/local/lib/python3.6/site-packages/requests_oauthlib/oauth2_session.py", line 307, in fetch_token
    self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 415, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 425, in parse_token_response
    validate_token_parameters(params)
  File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 432, in validate_token_parameters
    raise_from_error(params.get('error'), params)
  File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/errors.py", line 406, in raise_from_error
    raise CustomOAuth2Error(error=error, **kwargs)
oauthlib.oauth2.rfc6749.errors.CustomOAuth2Error: (invalid_client_id) client identifier invalid

@robnagler
Copy link
Author

Thanks for letting us know @singingwolfboy!

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

No branches or pull requests

4 participants