-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
api: runIssues related to the Cloud Run API.Issues related to the Cloud Run API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Environment details
- OS type and version: macOS 12
- Python version: Python 3.10.7
- pip version: pip 22.2.2
google-auth-oauthlib
version: 0.5.3
Steps to reproduce
- Run these methods
flow = InstalledAppFlow.from_client_secrets_file(client_secrets_file,
scopes=[
'openid', 'https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/userinfo.profile'
])
google_credentials = flow.run_local_server(
host='localhost',
port=8080,
authorization_prompt_message='Please visit this URL: {url}',
success_message='The auth flow is complete; you may close this window.',
open_browser=True)
- Access it with an unauthorized account
Code example to resolve
Add this additional code in run_local_server()
method
_DEFAULT_TIMEOUT = 5
def run_local_server(
self,
host="localhost",
bind_addr=None,
port=8080,
authorization_prompt_message=_DEFAULT_AUTH_PROMPT_MESSAGE,
success_message=_DEFAULT_WEB_SUCCESS_MESSAGE,
open_browser=True,
redirect_uri_trailing_slash=True,
timeout = _DEFAULT_TIMEOUT,
**kwargs
):
local_server.timeout = timeout
I will raise a PR if this is agreed upon.
Metadata
Metadata
Assignees
Labels
api: runIssues related to the Cloud Run API.Issues related to the Cloud Run API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.