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

Flow.autogenerate_code_verifier does not default to True and flow.code_verifier is None #354

Open
Perun108 opened this issue Jun 11, 2024 · 0 comments · May be fixed by #356
Open

Flow.autogenerate_code_verifier does not default to True and flow.code_verifier is None #354

Perun108 opened this issue Jun 11, 2024 · 0 comments · May be fixed by #356
Assignees

Comments

@Perun108
Copy link

Environment details

  • OS type and version: OSX Sonoma 14.5
  • Python version: python --versionPython 3.11.4
  • pip version: pip --version 23.1.2
  • google-auth-oauthlib version: pip show google-auth-oauthlib 1.1.0

Steps to reproduce

  1. Create an instance of Flow from client config:
  2. Generate an authorization url from Flow instance
  3. Try to access code_verifier and it will be None

Code example

client_config = {
        "web": {
                "client_id": YOUR_CLIENT_ID,
                "client_secret": YOUR_CLIENT_SECRET,
                "auth_uri": "https://accounts.google.com/o/oauth2/auth",
                "token_uri": "https://oauth2.googleapis.com/token",
                "redirect_uris": [redirect_uri],
            }
        }

flow = Flow.from_client_config(
            client_config,
            scopes=scopes,
            redirect_uri=redirect_uri)

url, gen_state = flow.authorization_url(prompt="consent select_account", state=state)

>>>flow.code_verifier is None
>>>True

Stack trace

# example

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment