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

Authentication on refresh has to be explicit but shouldn't be #202

Open
jsfan opened this issue Oct 25, 2015 · 4 comments
Open

Authentication on refresh has to be explicit but shouldn't be #202

jsfan opened this issue Oct 25, 2015 · 4 comments

Comments

@jsfan
Copy link

jsfan commented Oct 25, 2015

RFC 6749 recommends the use of HTTP Basic auth for OAuth2. While requests-oauthlib allows for authentication details to be sent along explicitly when fetching tokens, the credentials would have to be passed to every single request in order for the refresh to work.

Oauth2Session should probably either take the credentials on fetch and then store them to use for refresh or already take them in the constructor.

I am happy to contribute the patch but would like to have an opinion first as to which path to go down.

@Lukasa
Copy link
Member

Lukasa commented Oct 26, 2015

@jsfan Do you have a proposed API for this?

@jsfan
Copy link
Author

jsfan commented Dec 2, 2015

The approach I tried turned out not to work and I haven't had a chance to revisit and try something else. It has not been forgotten though.

@mmerickel
Copy link

Yes auto-refresh seems to be currently broken unless you pass the client_secret along with every request. Ideally this would be stored in the OAuth2Session itself so that it was there when it was needed.

@btimby
Copy link

btimby commented Mar 3, 2017

My proposal is to accept client_secret in __init__() for use in refresh_token(). client_id is already passed and accessible.

#264

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