JeffreyCA / spotify-recently-played-readme

Display your recently played Spotify tracks on your GitHub profile README.
https://spotify-recently-played-readme.vercel.app
MIT License
364 stars 45 forks source link

Add unique query parameter to remove duplicate tracks #11

Closed setoelkahfi closed 3 years ago

setoelkahfi commented 3 years ago

Hey @JeffreyCA, I like this. Thank you. I add the ability to only show the unique tracks on the widget and some other changes :)

JeffreyCA commented 3 years ago

@setoelkahfi Unfortunately the env var changes aren't working. The environment variables are server-side only so when you click authorize (client-side process), client_id and redirect_uri are undefined.

If you take a look here, to expose the variables to the browser you'll need to append NEXT_PUBLIC_ to those variable names. Can you make those changes?

Deployment: https://spotify-recently-played-readme-jdyo4ecyn-jeffreyca.vercel.app/

setoelkahfi commented 3 years ago

@setoelkahfi Unfortunately the env var changes aren't working. The environment variables are server-side only so when you click authorize (client-side process), client_id and redirect_uri are undefined.

If you take a look here, to expose the variables to the browser you'll need to append NEXT_PUBLIC_ to those variable names. Can you make those changes?

Deployment: https://spotify-recently-played-readme-jdyo4ecyn-jeffreyca.vercel.app/

Yeah, that's what I said. I thought it's just me. I'll push the update.

setoelkahfi commented 3 years ago

@JeffreyCA I pushed the update. I think I tried it (prefix them with NEXT_PUBLIC_) before and had no luck. Haven't tried it again since then.

JeffreyCA commented 3 years ago

@JeffreyCA I pushed the update. I think I tried it (prefix them with NEXT_PUBLIC_) before and had no luck. Haven't tried it again since then.

Thanks, you'll need to update this too: https://github.com/JeffreyCA/spotify-recently-played-readme/blob/0235a5c05204aa3ac0c3f05fb4790e28e8d431a2/utils/SpotifyAuthUtil.ts#L14