Conversation
- Reduce token validation cache from 1 hour to 15 minutes - Add invalidate_cache_for_function() to selectively clear stale cache - Clear old cache entries on 401 Unauthorized errors - Improves handling of expired tokens without clearing entire cache
- Add DeviceAuth class for Twitch Device Code Grant Flow - Support automatic token refresh (tokens valid 30 days) - Add settings UI for connect/disconnect buttons - Store refresh token and expiry in Kodi settings - Auto-refresh tokens in API class before API calls - Add English translation strings for Device Auth UI
Device Auth tokens are third-party OAuth tokens that get rejected by the GQL/private API with 401. The GQL API works fine with anonymous access (Client-ID only) or first-party website tokens. Changes: - save_device_tokens: no longer saves to twitch_hevc_token - clear_device_tokens: no longer clears twitch_hevc_token - get_private_credential_headers: only uses HEVC token for GQL auth - _try_auto_refresh: cleanup migration for old token state
- Helix API uses user's own registered Twitch App Client-ID - GQL API always uses hardcoded Twitch web Client-ID (kimne78kx3ncx6brgo4mv6wki5h1ko) - Device Auth requires user's Client-ID (hint dialog if missing) - Hidden settings (oauth_token_helix, refresh_token, expires_at) removed from GUI - Auto-clear stale tokens from mismatched Client-IDs - Error message now references 'Connect with Twitch' instead of 'Get OAuth token' - Added client_id_required string (30321) in EN and DE
Feature/device code auth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.