Setup
1
Get credentials
Go to the Spotify Developer Dashboard and create an app. Under Edit Settings, add your redirect URI:Environment variables
Scopes
Default scopes:user-read-email, user-read-private
To access additional Spotify data, pass extra scopes. They are added on top of the defaults:
The
user-read-email scope is required to retrieve the user’s email address. Without it, the provider returns no email, and the oauth() plugin cannot match or create a user for that account (the callback returns JSON instead of a session).