Skip to content

Commit 6c9c0c4

Browse files
authored
fix: fix SPOTIFY_REDIRECT_URI in backend controller (#3)
2 parents 86e5da8 + bc7e51b commit 6c9c0c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/src/controllers/spotifyController.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async function handleCallback(req, res) {
3030
const spotifyApi = new SpotifyWebApi({
3131
clientId: spotifyConfig.clientId,
3232
clientSecret: spotifyConfig.clientSecret,
33-
redirectUri: `${process.env.BASE_URL || 'http://localhost:3001'}/api/spotify/callback`
33+
redirectUri: process.env.SPOTIFY_REDIRECT_URI || 'http://localhost:3001/api/spotify/callback'
3434
});
3535

3636
// Échanger le code contre des tokens
@@ -162,4 +162,4 @@ function verifyRoomAndSpotify(req, res) {
162162
}
163163

164164
return Room.get(roomCode);
165-
}
165+
}

0 commit comments

Comments
 (0)