Twitch OAuth with PKCE; requires Client-Id header for user API.
Twitch requires the Client-Id header when calling /helix/users. PKCE (S256) is enabled by default.
# .env.local
AUTH_SECRET=your-secret-key-min-32-chars-long
TWITCH_CLIENT_ID=your-twitch-client-id
TWITCH_CLIENT_SECRET=your-twitch-client-secret
TWITCH_REDIRECT_URI=http://localhost:3000/api/auth/callback/twitchMinimal configuration
import { twitch } from '@warpy-auth-sdk/core';
const provider = twitch({
clientId: process.env.TWITCH_CLIENT_ID!,
clientSecret: process.env.TWITCH_CLIENT_SECRET!,
redirectUri: process.env.TWITCH_REDIRECT_URI!,
scope: ['user:read:email'],
});TWITCH_CLIENT_ID is configured.