Skip to main content

Sign in with Spotify

People can now link their Spotify account on Linked accounts and sign in to Apiome with it from then on.

  • For administrators. Spotify is a new entry in System settings → Add Provider. It needs the Client ID and Client secret of an app created in the Spotify Developer Dashboard with the Web API — no issuer. Sign-in providers lists what to set on Spotify's side. The environment variables are SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET.
  • Callback URL. <BETTER_AUTH_URL>/api/auth/oauth2/callback/spotify, added under the app's Redirect URIs.
  • Scopes. Apiome asks for user-read-email only and uses it to read the name, email address and picture of the person signing in. Apiome reads no playlists, library, listening history or playback and keeps no Spotify token.
  • Link first. Spotify does not verify the email address it shares, so Apiome never uses it to find or create an account. People sign in another way, link Spotify from Linked accounts, and can sign in with Spotify after that. Before linking, a Spotify sign-in ends with Your sign-in provider could not confirm that your email address is verified…. How a provider's email is trusted explains the classes.
  • REST API. GET /v1/admin/auth-providers lists spotify as an available provider, and PUT /v1/admin/auth-providers/spotify stores its credentials.