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

Why spotipy's Oauth server is not available through 127.0.0.1:8083? #5

Open
jkulak opened this issue Feb 20, 2022 · 1 comment
Open

Comments

@jkulak
Copy link
Collaborator

jkulak commented Feb 20, 2022

I would expect OAuth browser interaction to work after exposing port 8083 in containers, and then forwarding this port
docker run -ti --rm --network spotify-grabtrack_default -p 8083:8083 -v $(pwd)/app/src:/app --env-file .env spotify-grabtrack_app sh

Currently it's only working with open_browser=False in

sp = spotipy.Spotify(auth_manager=SpotifyOAuth(scope=scope, open_browser=False)) so I have to manually copy the URL that is not accessing temporary http server created by Spotipy.

http://127.0.0.1:8080 is working for adminer.

The flow is working when run without Docker.

When I do wget 127.0.0.1:8083/?code=sdfafadf from within the container the local OAuth server reads the code.

So it seems that 127.0.0.1:8083/ is not exposed? Doesn't take requests from the host/from the outside.

@jkulak
Copy link
Collaborator Author

jkulak commented Mar 9, 2022

I found the solution, I might suggest changes in Spotipy repository: spotipy-dev/spotipy#789

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