Expand description
OAuth 2.0 authentication with PKCE for Spotify Web API.
This module implements the Authorization Code flow with PKCE (Proof Key for Code Exchange), which is the recommended flow for public clients like CLI applications.
§Flow Overview
- Generate PKCE challenge/verifier pair
- Open browser to Spotify authorization URL
- Start local callback server to receive auth code
- Exchange auth code for access/refresh tokens
§Usage
ⓘ
use spotify_cli::oauth::flow::OAuthFlow;
let flow = OAuthFlow::new("client_id".to_string());
let token = flow.authenticate().await?;Modules§
- callback_
server - Local HTTP server for OAuth callback.
- flow
- OAuth 2.0 Authorization Code flow with PKCE.
- pkce
- PKCE (Proof Key for Code Exchange) implementation.
- token
- OAuth token types and expiry handling.