Skip to content

feat(offline): bridge authenticated sessions#40

Merged
rdlabo merged 1 commit into
mainfrom
feat/offline-auth-bridge
Jul 25, 2026
Merged

feat(offline): bridge authenticated sessions#40
rdlabo merged 1 commit into
mainfrom
feat/offline-auth-bridge

Conversation

@rdlabo

@rdlabo rdlabo commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add createOfflineAuthBridge to own the shared credential exchange → remote session preparation → access publication → transport resume lifecycle
  • guard every async boundary with auth leases plus provider-subject checks, with optional product object-identity validation
  • share offline fallback and background recovery wiring without absorbing product-specific consent, DTO mapping, redirects, or error UI
  • document the integration boundary and export the bridge from @rdlabo/ionic-angular-kit/offline

Why

winecode and tipsys currently duplicate this lifecycle in app.config.ts. The duplication is security-sensitive: a logout or account replacement during credential exchange, replica preparation, or transport resume must not publish or persist the old identity. The bridge centralizes those invariants while leaving product policy in callbacks.

Backward compatibility

This change is additive. Existing provideKitAuth hooks and direct OfflineCoordinatorService callers are unchanged. authSubject is required only for identities passed to the new bridge. Existing scope id 0 remains accepted for current tipsys compatibility.

Product migration check

  • winecode maps its existing subject to authSubject; its exchange/consent and alert logic remain product-owned
  • tipsys carries authSession and redirect data as additional typed identity fields, uses isIdentityCurrent for Firebase object identity, and moves its post-resume redirect to onRemoteResumed

Validation

  • npm run prebuild
  • npm test (all workspace projects; kit: 509 tests)
  • npm run lint
  • npm run test:offline-types:nonstrict
  • npm run test:actions
  • git diff --check

@netlify

netlify Bot commented Jul 25, 2026

Copy link
Copy Markdown

Deploy Preview for rdlabo-ionic-angular-library ready!

Name Link
🔨 Latest commit d8d4458
🔍 Latest deploy log https://app.netlify.com/projects/rdlabo-ionic-angular-library/deploys/6a64ae34faa87100086e5682
😎 Deploy Preview https://deploy-preview-40--rdlabo-ionic-angular-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rdlabo
rdlabo marked this pull request as ready for review July 25, 2026 13:44
@rdlabo
rdlabo merged commit eb9772a into main Jul 25, 2026
12 checks passed

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

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