I built a Spotify recently-played banner for GitHub — without registering an OAuth app
Nityanand Thakur developed a self-hosted Spotify recently-played banner for GitHub without the need for OAuth app registration. The solution utilizes the sp_dc session cookie and the PKCE authorization flow to obtain a bearer token for accessing recently played tracks. The implementation is designed to cache tokens and bypass GitHub's Camo proxy cache for real-time updates.
- ▪The project allows users to display their recently played Spotify tracks on GitHub without registering an OAuth app.
- ▪It leverages the sp_dc cookie and PKCE flow to obtain a bearer token seamlessly.
- ▪The implementation includes features like token caching and bypassing GitHub's aggressive caching for real-time updates.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3957880) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Nityanand Thakur Posted on May 29 I built a Spotify recently-played banner for GitHub — without registering an OAuth app #go #github #opensource #spotify Most "Spotify for GitHub README" projects share the same setup story: go to the Spotify developer dashboard, register an app, grab a client ID and secret, plug them into some hosted service, authorize it, and hope the maintainer keeps the server running. I wanted something self-hosted, with no developer app registration at all.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).