A simple identity provider extension for Keycloak to be used with Spotify.
Download the latest release and place it in your keycloak opt/keycloak/providers
directory.
Docker step example:
ADD --chown=keycloak:keycloak https://github.com/sanderrouk/keycloak-spotify/releases/download/1.0.0-BETA/io.rouk.keycloak-spotify-1.0.0-BETA.jar /opt/keycloak/providers/io.rouk.keycloak-spotify-1.0.0-BETA.jar
The setup afterwards is simple.
- Navigate to your keycloak admin panel and choose your realm.
- Navigate to identity providers, click spotify.
- Go to https://developer.spotify.com and create an app or navigate to your app settings.
- Copy the Client ID and Client Secret from your Spotify app settings and add them into the configuration.
- You are done, if you need to access the Spotify tokens for some reason then you need to use the
broker
client'sread-token
role for that.
This is a very simple IdP and Spotify is not really a proper IdP anyways, however they do have some interesting scopes you may want to add to the token.
By default, only the user-read-email
scope is added.
Additional scopes: https://developer.spotify.com/documentation/web-api/concepts/scopes
The original proof of concept was done by JiriHartikka in 5c6c02f