Skip to content

Cannot run python cal sample from container (auth fails) #139

Open
@drewkhoury

Description

@drewkhoury

Expected Behavior

When I try to run the python cal sample from within a container it should allow me to auth successfully.

Actual Behavior

The terminal (in container) provides an "offline url" which when clicked (on desktop) redirects to a random high port that is not available from the desktop.

e.g:
Clicking "Allow" will redirect you to: http://localhost:46603
Clicking "Allow" will redirect you to: http://localhost:40391

Steps to Reproduce the Problem

  1. docker run -it python bash
  2. container> pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
  3. container> python quickstart.py
  4. host (chrome)> Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?...&access_type=offline
  5. Auth, then the redirect will fail

Note: Have also tried modifying the auth code to run on port 8080 and expose that port in the container. Have also confirmed that the port is exposed with a test of "python -m http.server 8080" in the container.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions