Skip to content

Develop#2

Merged
Serph91P merged 9 commits intomainfrom
develop
Feb 20, 2026
Merged

Develop#2
Serph91P merged 9 commits intomainfrom
develop

Conversation

@Serph91P
Copy link
Owner

No description provided.

- 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
@Serph91P Serph91P merged commit 42c106e into main Feb 20, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant