You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to add a check for the state variable inside /utils.ts/ for the module handleSpotifyAuth, which instantiates a state variable that should be verified (simple === will do) by the /api/spotify/getToken endpoint. The state should be included in the request URL (req.url) as the search parameter 'state'. This state variable ensures that the request to /api/spotify/getToken coming from the spotify API is a result of the call we make in handleSpotifyAuth, and not some outside entity. I would look into NextJS Cookies to store a cookie for the state variable between Server Components (this is what all /api/*/route.ts files are).
The text was updated successfully, but these errors were encountered:
I would like to add a check for the state variable inside /utils.ts/ for the module handleSpotifyAuth, which instantiates a state variable that should be verified (simple === will do) by the /api/spotify/getToken endpoint. The state should be included in the request URL (req.url) as the search parameter 'state'. This state variable ensures that the request to /api/spotify/getToken coming from the spotify API is a result of the call we make in handleSpotifyAuth, and not some outside entity. I would look into
NextJS Cookies
to store a cookie for the state variable between Server Components (this is what all /api/*/route.ts files are).The text was updated successfully, but these errors were encountered: