-
Notifications
You must be signed in to change notification settings - Fork 229
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
Provide a method to write User Credentials to file #54
Comments
There's already a TokenStore interface which seems to be intended for this purpose, but no concrete implementation is provided. |
Hello! Can I work on this enhancement? Which kind of TokenStore implementation would you like me to do? Any database (PostGreSQL, MongoDB) for storing and then loading back or just in file for storing? Just want to make sure I understand what is needed so that I can start working on it. Thanks! |
Contributions welcome! Per the contributions document, before we can accept a pull request from you, we'll need a signed CLA. For the first implementation, we'd probably want an in-memory version. Basically just enough to have a working TokenStore implementation. That way an application could use user authentication but would have to re-authenticate every time. Second, I'd want something that can save refresh tokens to a JSON file in a configuration directory. It's a different language, but something similar to what is done in the Pandas-GBQ library: https://github.com/pydata/pandas-gbq/blob/dbfb4e92d4b26fe5cff6c22e9ae420b324b8ac5a/pandas_gbq/gbq.py#L304 |
@tswast There is my PR for this issue - #129 Instead of only having the refresh tokens, I store a few other things. The implementation works in such way, so that if you call the method that saves userCredentials, it will overwrite everything what existed before. Let me know if you would like any changes. |
This appears to have been fixed in #129 by with Closing this out, but feel free to re-open if this is not the case. |
It would be helpful to give users the ability to generate a User Credentials JSON file. While this is a feature of Python's auth library, the only way users can get a User Credentials JSON file now is to login using the Google Cloud SDK and then go hunting for it in the configurations directory.
The text was updated successfully, but these errors were encountered: