Skip to content

Fix EPG refresh not working (due to expired JWT) - #134

Merged
ksooo merged 2 commits into
kodi-pvr:Piersfrom
ksooo:fix-jwt-expiration
May 4, 2026
Merged

ksooo merged 2 commits into
kodi-pvr:Piersfrom
ksooo:fix-jwt-expiration

Conversation

@ksooo

@ksooo ksooo commented Apr 30, 2026

Copy link
Copy Markdown
Member

fix: refresh JWT session token on HTTP 401 InvalidExpiredBearerToken

Replace the hardcoded 23-hour timer with reactive token refresh:

  • Add AuthenticatedGet() which retries once on HTTP 401 with errorCode "InvalidExpiredBearerToken"
  • Add IsExpiredTokenResponse() to detect the specific API error
  • Make m_jwt mutable so const API methods can transparently refresh
  • Fix GetChannelStreamURL() to call GetJWT() instead of using the stale m_jwt member directly
  • Remove m_jwtTimestamp and the dependency

@ksooo
ksooo merged commit 656bd66 into kodi-pvr:Piers May 4, 2026
8 checks passed
@ksooo
ksooo deleted the fix-jwt-expiration branch May 4, 2026 05:22
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