Skip to content

Commit 3086a6d

Browse files
authored
Fixed Api Error
Editing line 18, and removing the "encodeURIComponent" function seemed to fix an 400 error that I got when I tried to login. I found this same error when I tried to login to your example hosted on vercel.
1 parent 724f0f8 commit 3086a6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

example/src/pages/api/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const handler: NextApiHandler = (req, res) => {
1515
const redirectParams = new URLSearchParams({
1616
response_type: "code",
1717
client_id: SPOTIFY_CLIENT_ID,
18-
scope: encodeURIComponent(SPOTIFY_SCOPES.join(" ")),
18+
scope: SPOTIFY_SCOPES.join(" "),
1919
redirect_uri: SPOTIFY_REDIRECT_URI,
2020
state: state,
2121
});

0 commit comments

Comments
 (0)