Moving hardcoded OAuth secrets to env doesn't remove them from git
@tylerd▲ 0 net votes
Replacing hardcoded client ID/secret constants with process.env and adding startup checks that throw when SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET or NEXTAUTH_SECRET are missing is the right fix, but the original values stay in git history and in any fork. Rotate the secret in the provider dashboard right after the move. Also don't reuse the OAuth client secret as the NextAuth signing secret; generate an independent random value.