Skip to content

Fix private-channel credential refresh across experience switches and sessions - #2784

Open
trtshen wants to merge 41 commits into
login-refactorfrom
chaw-login-refactor
Open

trtshen wants to merge 41 commits into
login-refactorfrom
chaw-login-refactor

Conversation

@trtshen

@trtshen trtshen commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Private-channel authorization can retain credentials from an earlier session or experience. Current login-refactor already uses Pusher 8, but its credential-refresh code updates pusher.config.auth rather than the options captured by the SDK authorizer. Reconnects and experience changes can therefore authorize with stale credentials.

This change uses channelAuthorization.headersProvider to read the current API key and timeline for every authorization request. It keeps the reusable Pusher client, returns empty user credentials after logout, resolves the GraphQL /pusher_auth URL correctly, and supports the configured WebSocket transports.

Scope

  • Refresh authorization credentials per request during experience switches and reconnects.
  • Prevent the authorization provider from returning user credentials after logout.
  • Update focused regression tests and the realtime behavior documentation.
  • Synchronize the PR branch with login-refactor at 39f9f29, including the latest page-title fixes. No unrelated application changes are introduced by this PR.

Validation

  • 52 focused Pusher, Notifications and Experience tests passed against the combined current-target tree, using a temporary narrow TypeScript test configuration.
  • Safari: private-channel /pusher_auth returned 200 and subscription succeeded.
  • Safari: switched between enrolled timelines 1 → 3 → 1; only the active experience channel remained subscribed.
  • Safari: manual SDK disconnect/reconnect reauthorized with the current credential and resubscribed.
  • Safari: real AuthService logout cleared credentials, scope and channels; a fresh login restored subscriptions.
  • Existing checkout and running app were preserved. Verification used a separate worktree, dependency volume and HTTPS app instance; temporary browser probes were removed afterward.

Validation limits

The standard test command is blocked by existing unrelated TypeScript fixture errors (FileInput/ProfileAvatar directUrl and ProgramObj fields); this is not a full-suite pass. Safari used the existing development-only fixture login because the isolated port is not a registered OAuth callback. Provider OAuth/OTP, network-level automatic recovery, and private chat channels were not exercised. A non-enrolled template selection redirected to global login; both enrolled experiences passed switching checks.

@trtshen trtshen self-assigned this Sep 25, 2026
@trtshen

trtshen commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator Author
Screenshot 2026-09-28 at 1 31 09 PM practera-app is now running in healthy status from fresh installation in TUI

@trtshen
trtshen requested a review from shawnm0705 September 28, 2026 05:33
chaw and others added 26 commits September 29, 2026 11:25
…load-integration

[CORE-8379] Fix app TUS upload integration
…atar-race

[CORE-8379] Prevent stale profile reads from reverting avatars
…ader-refresh

[CORE-8379] Refresh header avatar and restore Settings
…-initialization

[CORE-8379] Upgrade to Ionic 9 to fix ARIA initialization
…rut script-src finding. (#2797)

CSP3 ignores unsafe-inline when a nonce is present, and strict-dynamic clears the host-allowlist bypass while leaving every other directive unchanged.
…hance GitHub Actions workflow for gitleaks detection
… improve authorization flow in oauth-pkce service
[CORE-8420] Add failure and recovery tests for OAuth handoff
Add OAuth handoff handling to UnauthorizedGuard and AppComponent, and…
…e-limits

[CORE-8391] Enforce source-specific upload size limits
Activity embeds were blocked because frame-src was missing and fell back to default-src 'self'. The nonce and strict-dynamic script-src control is unchanged.

Co-authored-by: sunil <sunil@practera.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@trtshen trtshen changed the title fix Pusher 8 channel authorization for realtime subscriptions Fix private-channel credential refresh across experience switches and sessions Nov 13, 2026

This branch has not been deployed

No deployments
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.

5 participants