import type { OAuthConfig } from '#auth-utils'; export interface OAuthSpotifyConfig { /** * Spotify OAuth Client ID * @default process.env.NUXT_OAUTH_SPOTIFY_CLIENT_ID */ clientId?: string; /** * Spotify OAuth Client Secret * @default process.env.NUXT_OAUTH_SPOTIFY_CLIENT_SECRET */ clientSecret?: string; /** * Spotify OAuth Scope * @default [] * @see https://developer.spotify.com/documentation/web-api/concepts/scopes * @example ['playlist-read-private'] */ scope?: string[]; /** * Require email from user, adds the ['user-read-email'] scope if not present * * Spotify doesn't return the email to Development Mode apps created since February 11, 2026, nor to existing ones since March 9, 2026. Extended Quota Mode apps still receive it. * @default false * @see https://developer.spotify.com/documentation/web-api/tutorials/february-2026-migration-guide */ emailRequired?: boolean; /** * Spotify OAuth Authorization URL * @default 'https://accounts.spotify.com/authorize' */ authorizationURL?: string; /** * Spotify OAuth Token URL * @default 'https://accounts.spotify.com/api/token' */ tokenURL?: string; /** * Extra authorization parameters to provide to the authorization URL * @see 'https://developer.spotify.com/documentation/web-api/tutorials/code-flow' * @example { show_dialog: 'true' } */ authorizationParams?: Record; /** * Redirect URL to to allow overriding for situations like prod failing to determine public hostname * @default process.env.NUXT_OAUTH_SPOTIFY_REDIRECT_URL or current URL */ redirectURL?: string; } interface SpotifyUser { /** Stable identifier, recommended by Spotify for account linking instead of `id` */ account_id: string; display_name: string | null; external_urls: { spotify: string; }; href: string; id: string; images: { url: string; height: number | null; width: number | null; }[]; type: string; uri: string; /** @deprecated Only returned to Extended Quota Mode apps since February 2026 */ country?: string; /** @deprecated Only returned to Extended Quota Mode apps since February 2026 */ email?: string; /** @deprecated Only returned to Extended Quota Mode apps since February 2026 */ explicit_content?: { filter_enabled: boolean; filter_locked: boolean; }; /** @deprecated Only returned to Extended Quota Mode apps since February 2026 */ followers?: { href: string | null; total: number; }; /** @deprecated Only returned to Extended Quota Mode apps since February 2026 */ product?: string; } interface SpotifyTokens { access_token: string; token_type: string; scope: string; expires_in: number; refresh_token: string; } export declare function defineOAuthSpotifyEventHandler({ config, onSuccess, onError }: OAuthConfig): import("nuxt/server").EventHandler>; export {};