https://developer.spotify.com/documentation/web-api/tutorials/code-pkce-flow
- User clicks “Login with Spotify”
- Frontend generates
code_verifier
andcode_challenge
- Redirect user to Spotify with
code_challenge
- After login, Spotify redirects back with a code
- Frontend exchanges code +
code_verifier
for access token - Store access token in Supabase session or localStorage
- Use token to fetch Spotify data