-
Notifications
You must be signed in to change notification settings - Fork 949
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
move to google-auth? #529
Comments
@bnorquist good idea. I'm open to moving away from oauth2client. If someone wants to take a crack at this, it'll be more than welcome. |
Sounds good, I might have some time in the next few weeks to work on it. If so I'll make a pr and update this thread. |
@bnorquist @burnash I'd love to try and help. Let me know what you need. :-) |
Hey, uh, no idea who yall are but, I'm out here tryna use google-auth with gspread (to read & write Google Sheets), and i'm having the Are yall the people who actually work on this library?? if so that's cool and also lmk if there's been progress on this cos i'm reallyyyy tryna get into this google sheets + python action rn thaaaanks (??) |
Hi @whatareyoutalkingaboutyousoundinsane: Although your issue is out-of-scope and thus technically unsupported right now, I will do my best to respond, point-by-point:
Unfortunately, as this is an open issue (note the "open" status and "help wanted" label), it seems the
This is most likely because
Collectively, yes, "we" do all contribute to this project in one way or another. There are many ways to contribute, not all of which involve writing code (although many contributors do contribute code). As for the lead maintainer, that would be burnash, whose username is conveniently found at both the top of this page, and in the repository URL. If you're looking for a list of the most active contributors to this project, check out the Contributors to burnash/gspread` page. If you're looking for a specific person to get support from, the best solution is to comment on an issue like you already have. It's bad form to @mention specific people in a GitHub issue; please refrain from doing so. Make sure you also take a look at some guidelines for better communication. It's not reasonable to expect everyone to have a perfect knowledge of the English language, impeccable grammar, or a high degree of technical understanding, but if you have a problem you need to get solved, please do first put forth some effort. A good first step would be to read the 15 Rules of Communicating on GitHub by Ben Balter, as well as Wiredcraft's guide to writing good GitHub issues.
You can subscribe to this issue to get emails (by default) or push notifications from your web browser of choice (optional) when there's a new comment or progress is otherwise made on this issue. Take a look at the issue's sidebar under the Notifications heading. If what you see looks like this, you're all set: Otherwise, click the Subscribe button to begin receiving email notifications for this issue when it gets updated. |
Just a little tip on how to use gspread with Authlib: |
I was unable to get the Authlib method to work. @lepture
|
@liquidgenius you need to change |
FYI: Generated a new
This is great, thanks for posting here! I can do this in Oauth2Client: credentials = credentials.create_delegated(user_email) From here: https://developers.google.com/admin-sdk/directory/v1/guides/delegation Can this be done in Authlib? Thanks |
I just discovered how to do it: the "subject" parameter. If I pass the email of the account I want to impersonate in the subject parameter, it works. |
pygsheets uses google-auth. Perhaps its code could provide inspiration: https://github.com/nithinmurali/pygsheets/blob/staging/pygsheets/authorization.py |
I'm giving it a quick shot right now. For the gspread Client class it checks for auth.access_token but google-auth would just have auth.token, I'll see if I can write some clean code to check which one exists and then have a token object to do the check for refreshing. I'm sure I might have to make more changes but that basic change should be easy enough. |
Fwiw, and as mentioned by @mcarans above, I recently switched to using nithinmurali/pygsheets and it worked almost seamlessly as a replacement for |
Haha yes I thought it'd be as simple as just updating how to get the token from the new google-auth Credentials object, but I see nope! It's a whole new process Google has made now. I think the biggest challenge I'm thinking of right now is how to still provide backwards capability for the old oauth2 library. |
The new google-auth library has In order to support backward compatibility with |
So took a stab at this here. It's pretty easy to implement a conversion, but it does require adding |
@aiguofer can you make a PR to get your change in? It looks good. |
Hey, yeah sorry! I don't know why I didn't do that earlier. Here's the PR: #711 |
@aiguofer Great, thanks. I have added a PR aiguofer#1 to your PR :) |
gspread does not seem to be compatible with credential objects generated by google.auth library. Since oauth2client has been deprecated is there a plan to move to the new library for auth?
The documentation for google.auth is already superior to that of oauth2client and works in a very similar manner.
The text was updated successfully, but these errors were encountered: