-
Notifications
You must be signed in to change notification settings - Fork 310
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
feat: add reauth feature to user credentials #727
Conversation
7d5dbd1
to
65ec98d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is pyu2f owned by a team? It looks like it hasn't been touched since last October. https://github.com/google/pyu2f, https://github.com/google/pyu2f
Yes gnubby team owns it. |
Note that it doesn't seem like it's currently possible for GCP projects to enable the reauth API in the cloud console making it impossible to use reauth. See: |
googlers see: go/guac-python-reauth
This PR does 2 things:
1. Integrated google-reauth-python into google-auth library
Main APIs:
Supported challenge types: PASSWORD, SECURITY_KEY. To use SECURITY_KEY type,
pyu2f
dependency is required (either runpip install pyu2f
orpip install google-auth[reauth]
.2. Added reauth feature to user credentials (google.oauth2.credentials.Credentials)
If users opts in reauth (outside the scope of this lib), current google-auth version's refresh method will fail. With the added reauth feature, reauth flow will be triggered and the refresh method will work.
if users don't opt in reauth, then there is no difference w/o reauth feature because reauth won't be triggered.
Future PR will add reauth to async version of the credentials.