Skip to content

Feature/device code auth#1

Merged
Serph91P merged 5 commits intodevelopfrom
feature/device-code-auth
Feb 20, 2026
Merged

Feature/device code auth#1
Serph91P merged 5 commits intodevelopfrom
feature/device-code-auth

Conversation

@Serph91P
Copy link
Owner

No description provided.

- 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 17d1596 into develop Feb 20, 2026
1 check failed
@Serph91P Serph91P deleted the feature/device-code-auth branch February 20, 2026 20:08
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