Commit graph

6 commits

Author SHA1 Message Date
Benjamin Slingo 98227210cb Add missing ConfigManager parameter updates to main.rs and server.rs 2025-09-04 09:08:55 -04:00
Benjamin Slingo 084f2d7cb7 Fix OAuth token refresh and persistence issues
- Add show_dialog=true to OAuth URL to ensure fresh refresh tokens
- Prevent token clearing when refresh fails to avoid total auth loss
- Add ConfigManager to SpotifyClient for token persistence
- Fix token handling flow to maintain authentication state

This resolves the issue where tokens worked once then failed permanently
due to missing refresh tokens and aggressive token clearing on errors.
2025-09-04 09:04:44 -04:00
Benjamin Slingo e09e8b2d67 Implement bulletproof OAuth code reuse prevention
- Add state parameter generation and validation with crypto-secure random values
- Implement used authorization code tracking to prevent replay attacks
- Add automatic redirect after successful auth to prevent refresh issues
- Enhance OAuth callback with comprehensive security checks
- Fix route conflicts between home page and OAuth callback handling
- Add rand dependency for secure state generation
- Update models.rs to handle optional Spotify API fields
- Improve error messages and logging for security violations
2025-08-30 23:35:20 -04:00
RTSDA 3c37d91bc4 Add complete runit service configuration and deployment scripts
- Add runit service files for spotify-tracker daemon
- Include log service configuration with svlogd
- Create automated deploy.sh script for server setup
- Add comprehensive deployment documentation
- Service runs as dedicated spotify-tracker user
- Includes service management commands and troubleshooting guide
2025-08-20 09:26:24 -04:00
RTSDA e666bbe9ff Add OAuth2 web interface for automated Spotify authentication
- Add /auth endpoint with user-friendly web form
- Add OAuth callback handler that automatically exchanges codes for tokens
- Update redirect URI to spotify.tougie.live subdomain
- Add success/error pages for authentication flow
- Switch to rustls-only for better cross-platform compatibility
- Update server endpoints to show spotify.tougie.live URLs
- Remove manual code entry requirement
2025-08-20 09:21:54 -04:00
RTSDA bcfa2ba1c2 Initial Spotify Tracker with PhantomBot integration
- Rock-solid Rust implementation replacing unreliable custom API
- OAuth2 authentication with automatic token refresh
- HTTP server with multiple endpoints (/current, /phantombot, /health)
- Comprehensive error handling and retry logic
- PhantomBot integration examples and documentation
- CLI tool with monitoring and configuration management
2025-08-18 17:56:58 -04:00