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

InstalledAppFlow.run_local_server does not raise expected error on timeout #276

Open
juhhov opened this issue Apr 6, 2023 · 0 comments
Open

Comments

@juhhov
Copy link

juhhov commented Apr 6, 2023

Environment details

  • OS type and version: Ubuntu 20.04
  • Python version: Python 3.10.10
  • pip version: pip 23.0.1
  • google-auth-oauthlib version: Version: 1.0.0

Steps to reproduce

  1. Start authentication flow using InstalledAppFlow
  2. Once browser is opened do not proceed but close browser
  3. Wait for timeout to trigger
  4. AttributeError: 'NoneType' object has no attribute 'replace' is raised instead of expected timeout specific error

Code example

flow = InstalledAppFlow.from_client_secrets_file(
    client_secrets_file=client_secret_file,
    scopes=['https://www.googleapis.com/auth/userinfo.email', 'openid', 'https://www.googleapis.com/auth/userinfo.profile'])
return flow.run_local_server(
    host='localhost',
    port=port,
    authorization_prompt_message='Please visit this URL: {url}',
    success_message='The auth flow is complete; you may close this window.',
    open_browser=True,
    timeout_seconds=20)
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

1 participant