Skip to content

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

@kosperun

Description

@kosperun

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions