From e62a8a80cb9bf96dd2f6b19194d8b49cc1e7f02a Mon Sep 17 00:00:00 2001 From: Axel <44074386+axel-de-block@users.noreply.github.com> Date: Wed, 9 Apr 2025 22:14:15 +0200 Subject: [PATCH] use 127.0.0.1 instead of localhost to meet new spotify URI criteria (#116) --- example_config.yml | 2 +- tests/unit/test_auth.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example_config.yml b/example_config.yml index dc1240a..e03971d 100644 --- a/example_config.yml +++ b/example_config.yml @@ -2,7 +2,7 @@ spotify: client_id: your_client_id client_secret: your_client_secret username: your_spotify_username - redirect_uri: http://localhost:8888/callback + redirect_uri: http://127.0.0.1:8888/callback open_browser: True # Set to False if using a headless server environment diff --git a/tests/unit/test_auth.py b/tests/unit/test_auth.py index fdf586b..c857984 100644 --- a/tests/unit/test_auth.py +++ b/tests/unit/test_auth.py @@ -23,7 +23,7 @@ def test_open_spotify_session(mocker): "username": "test_user", "client_id": "test_client_id", "client_secret": "test_client_secret", - "redirect_uri": "http://localhost/", + "redirect_uri": "http://127.0.0.1/", "open_browser": True, } @@ -40,7 +40,7 @@ def test_open_spotify_session(mocker): scope=SPOTIFY_SCOPES, client_id="test_client_id", client_secret="test_client_secret", - redirect_uri="http://localhost/", + redirect_uri="http://127.0.0.1/", requests_timeout=2, open_browser=True, ) @@ -64,7 +64,7 @@ def test_open_spotify_session_oauth_error(mocker): "username": "test_user", "client_id": "test_client_id", "client_secret": "test_client_secret", - "redirect_uri": "http://localhost/", + "redirect_uri": "http://127.0.0.1/", } # Mock sys.exit to prevent the test from exiting