From b29cb15e193099481bc72c9e430f36036f0ce7dc Mon Sep 17 00:00:00 2001 From: onlinefella Date: Sat, 13 Dec 2025 16:29:04 -0500 Subject: [PATCH 1/2] Update auth.ts current code fails to authenticate new users because of an update to OAuth2.0 security protocol. http://localhost: requests are no longer considered secure and spotify requires http://127.0.0.1: to be used instead. --- src/main/auth.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/auth.ts b/src/main/auth.ts index f41f012..e074cc7 100644 --- a/src/main/auth.ts +++ b/src/main/auth.ts @@ -49,7 +49,7 @@ export const getAuthUrl = (): string => { const scopes = AUTH_SCOPES.join('%20'); const authUrl = - `${AUTH_URL}?response_type=code&client_id=${AUTH_CLIENT_ID}&redirect_uri=http://localhost:${AUTH_PORT}&` + + `${AUTH_URL}?response_type=code&client_id=${AUTH_CLIENT_ID}&redirect_uri=http://127.0.0.1:${AUTH_PORT}&` + `scope=${scopes}&state=${codeState}&code_challenge=${codeChallenge}&code_challenge_method=S256`; return authUrl; @@ -120,7 +120,7 @@ const retrieveAccessToken = async (verifier: string, code: string): Promise { }; const handleServerResponse = async (request: http.IncomingMessage, response: http.ServerResponse): Promise => { - const urlObj = new URL(`http://localhost:${AUTH_PORT}/${request.url}`); + const urlObj = new URL(`http://127.0.0.1:${AUTH_PORT}/${request.url}`); const queryState = urlObj.searchParams.get('state'); try { From 2961df5a4950da968868f0aa9fdac927baa0b624 Mon Sep 17 00:00:00 2001 From: onlinefella Date: Sun, 14 Dec 2025 23:44:05 -0500 Subject: [PATCH 2/2] Update auth.ts --- src/main/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/auth.ts b/src/main/auth.ts index e074cc7..6d1f46b 100644 --- a/src/main/auth.ts +++ b/src/main/auth.ts @@ -17,7 +17,7 @@ let onTokenRetrieved: (data: AuthData) => void = null; const AUTH_URL = 'https://accounts.spotify.com/authorize'; const AUTH_TOKEN_URL = 'https://accounts.spotify.com/api/token'; -const AUTH_CLIENT_ID = '69eca11b9ccd4bd3a7e01e6f9ddb5205'; +const AUTH_CLIENT_ID = '8a501eb93a49490589ee2ca4a25615f5'; const AUTH_PORT = 41419; const AUTH_SCOPES = [ 'user-read-playback-state',