Add Spotify integration with improved token management and user interface
- Implemented Spotify OAuth handling in spotify_client_manager.py to ensure valid access tokens for users. - Created helper functions in spotify_helper.py for refreshing tokens and retrieving user information. - Developed manage_spotify.html template for connecting and managing Spotify accounts, displaying connection status and token information. - Added logging for token management processes to enhance debugging and monitoring. - Introduced a debug client for Spotify interactions to facilitate easier testing and development.
This commit is contained in:
@@ -57,7 +57,7 @@ class User(db.Model, UserMixin):
|
||||
auth_provider = db.Column(db.String(20), default='local') # 'local', 'google', 'authentik'
|
||||
|
||||
# OAuth provider info - Spotify
|
||||
oauth_id = db.Column(db.String(100)) # Spotify user ID
|
||||
spotify_id = db.Column(db.String(100), index=True, unique=True, nullable=True) # Spotify user ID
|
||||
spotify_token = db.Column(db.Text) # Store Spotify access token
|
||||
spotify_refresh_token = db.Column(db.Text) # Store Spotify refresh token
|
||||
spotify_token_expiry = db.Column(db.DateTime)
|
||||
|
||||
Reference in New Issue
Block a user