Spotify: manueller PKCE-Login ohne SSH-Port-Forward (Redirect-URI ist hart auf localhost validiert)
This commit is contained in:
@@ -230,6 +230,25 @@ aufmachen:
|
||||
ssh -N -L 43827:127.0.0.1:43827 <user>@<hermes-maschine>
|
||||
```
|
||||
|
||||
**Kein SSH-Port-Forward moeglich?** Hermes validiert `redirect_uri` hart auf
|
||||
`127.0.0.1`/`localhost` (kein oeffentlicher Callback moeglich), aber der
|
||||
lokale Listener laesst sich umgehen: `scripts/spotify_manual_auth.py` baut
|
||||
dieselbe PKCE-Autorisierungs-URL, wartet aber nicht auf den Callback,
|
||||
sondern fragt Dich nach dem `code`-Parameter, den Du von Hand aus der
|
||||
(fehlschlagenden) Redirect-URL in der Adressleiste kopierst. Das Ergebnis
|
||||
landet 1:1 im selben Format in `~/.hermes/auth.json` wie beim normalen
|
||||
Login.
|
||||
```bash
|
||||
docker cp scripts/spotify_manual_auth.py hermes-agent:/tmp/spotify_manual_auth.py
|
||||
docker exec -it hermes-agent python3 /tmp/spotify_manual_auth.py
|
||||
```
|
||||
Details/Ablauf stehen im Docstring des Skripts. Du kannst dabei dieselbe
|
||||
Spotify-Dev-App wie fuer ARIA wiederverwenden — dafuer im
|
||||
[Spotify-Dashboard](https://developer.spotify.com/dashboard) bei der
|
||||
bestehenden App unter *Settings → Redirect URIs* zusaetzlich
|
||||
`http://127.0.0.1:43827/spotify/callback` eintragen (kein neues
|
||||
Client-Secret noetig, PKCE braucht nur die Client-ID).
|
||||
|
||||
Hinweis: Free-Spotify-Account reicht fuer Suche/Playlists/Library, fuer
|
||||
echte Playback-Steuerung (play/pause/skip auf einem Geraet) braucht's
|
||||
Spotify Premium.
|
||||
|
||||
Reference in New Issue
Block a user