Spotify OAuth with PKCE and user profile scopes.
Spotify supports PKCE (S256) by default. Recommended scopes include user-read-emailand user-read-private for profile access.
# .env.local
AUTH_SECRET=your-secret-key-min-32-chars-long
SPOTIFY_CLIENT_ID=your-spotify-client-id
SPOTIFY_CLIENT_SECRET=your-spotify-client-secret
SPOTIFY_REDIRECT_URI=http://localhost:3000/api/auth/callback/spotifyMinimal configuration
import { spotify } from '@warpy-auth-sdk/core';
const provider = spotify({
clientId: process.env.SPOTIFY_CLIENT_ID!,
clientSecret: process.env.SPOTIFY_CLIENT_SECRET!,
redirectUri: process.env.SPOTIFY_REDIRECT_URI!,
scope: ['user-read-email', 'user-read-private'],
});images[0].url to the user picture when available.