- HTML 81.8%
- JavaScript 18.2%
Express backend with OAuth callback exchange, single-page dark-themed frontend, MIT license, README, and .gitignore. Co-authored-by: CommandCodeBot <noreply@commandcode.ai> |
||
|---|---|---|
| public | ||
| .gitignore | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| server.js | ||
Spotify Refresh Token
A minimal web app to generate Spotify refresh tokens via the Authorization Code flow.
Why?
Spotify's Authorization Code flow requires a browser login, a redirect, and a server-side token exchange — annoying to do manually. This app handles the full flow for you: enter your app credentials, log in, get your refresh token.
Setup
git clone <your-repo-url>
cd spotify-refresh-token
npm install
Usage
npm start
Open http://localhost:3000, fill in your Spotify app credentials, and click Authorize with Spotify.
You'll need:
- Client ID — from your Spotify Developer Dashboard
- Client Secret — same place
- Redirect URI — must match one of the redirect URIs configured in your Spotify app settings (defaults to
http://localhost:3000)
After authorizing, the app displays your refresh token. Copy it — it's gone when you close the page.
Privacy
Nothing is stored. Credentials live in your browser's session storage only for the OAuth round-trip and are cleared immediately after. No data is logged, persisted, or sent anywhere except directly to Spotify's API.
Self-Hosting
Deploy to any Node.js hosting platform (Render, Railway, Fly.io, a VPS, etc.):
npm start
Set the PORT environment variable if your platform requires it:
PORT=8080 npm start
Make sure the Redirect URI in your Spotify app settings matches wherever you deploy.
License
MIT