-
Notifications
You must be signed in to change notification settings - Fork 960
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
Authentication works locally but not on server #814
Comments
You need to change your redirect URI to a URL on your server. You can't use See https://github.com/plamere/spotipy/blob/master/examples/app.py |
My goal was to have other users authenticate on their own, but that doesn't seem to be possible, right? From what I can tell, localhost and 127.0.0.1 can only be used running the servers locally (which makes sense), so if I were to use another URL, it goes to interactive authentication, which requires input to the terminal, which I don't have because Heroku is a non-interactive terminal. It appears I'm at a standstill. Perhaps this is now a feature request, then - either a way to perform non-interactive authentication for other users to use, or a way for interactive authentication to not require terminal input. |
any updates? im trying the same |
@itsa-mee-mario, @Mardiff, you have a full example here that lets multiple users authenticate via a non-local webserver https://github.com/plamere/spotipy/blob/master/examples/app.py |
@stephanebruckert hi, I seem to be having a problem similar to @Mardiff
i want the user to log into spotify, thatd need this url to be opened on the client side, is there any way to do that? |
Your |
getting another error saying
|
yes have done that, put the same application uri as a redirect uri |
Describe the bug
I've managed to get authentication working locally with caches. Essentially, I have an HTML form that calls the following line on submit:
sp = spotipy.Spotify( auth_manager=spotipy.SpotifyOAuth(username=spotify_username, scope=ALL_SCOPES, cache_path=f"./caches/{spotify_username}"))
This works fine when running my Flask app locally with Flask run, with my redirect URI set to http://localhost:8080/. However, with the same code, I am unable to get it working on a web server (speciflcally gunicorn inside a Heroku job).
With my redirect URI set to anything that doesn't contain a port, I get an EOF error since Spotipy is waiting for user input. That's fine. But when I include a port, like in http://localhost:8080/, the server lags for a while and then throws a [CRITICAL] WORKER TIMEOUT. Is it because I'm using gunicorn? Is that a known issue? Why else would this fail on a Heroku server when it works fine on my local server?
The text was updated successfully, but these errors were encountered: