-
Notifications
You must be signed in to change notification settings - Fork 954
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
Headless auth? #1073
Comments
@dougthor42 instead of doing a workaround just for the authentication flow in your headless environment, perform the auth flow once locally (i.e. in an environment where you can get redirected to a browser) which will create a |
Hi! Where exactly does that .cache file go? I have the same issue and it's driving me crazy. My remote server is running a python virtual environment that is running Apache Airflow. |
Looks like the same dir as the file being run. For example, in https://github.com/dougthor42/spotify-favorites-fixer: $ dthor@odin /c/dev/spotify-favorites-fixer (master): tree -L 1
spotify-favorites-fixer/
├── .cache # <-- Here it is!
├── ...
├── .venv/
├── ...
├── fix_spotify_favorites.py
├── ...
└── test_fix_spotify_favorites.py The file itself has this pattern: {
"access_token": "REDACTED",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "REDACTED",
"scope": "user-library-modify user-library-read",
"expires_at": 1708462345
} |
Hi there, sorry for the late reply. Most auth managers in spotipy have an |
Closing as this issue seems to be resolved. |
Is your feature request related to a problem? Please describe.
I run this using a headless host / one without access to a web browser (eg: I'm SSH'd into a different machine).
Describe the solution you'd like
When authenticating using the Authorization Code Flow, print the auth url in the terminal. This allows the user to copy it into a browser manually. Then wait for the user to paste the secret into the terminal.
Describe alternatives you've considered
For now I just have to copy my code to a non-headless (headfull?) machine and run it from there.
Additional context
Headless auth was also mentioned in the 3.0 ideas issue #652 (comment)
The text was updated successfully, but these errors were encountered: