javascript
javascript copied to clipboard
fix(clerk-js): unset domain cookies
Description
Evaluating this change.. not ready for merge
Checklist
- [ ]
pnpm testruns as expected. - [ ]
pnpm buildruns as expected. - [ ] (If applicable) JSDoc comments have been added or updated for any package exports
- [ ] (If applicable) Documentation has been updated
Type of change
- [ ] 🐛 Bug fix
- [ ] 🌟 New feature
- [ ] 🔨 Breaking change
- [ ] 📖 Refactoring / dependency upgrade / documentation
- [ ] other:
Summary by CodeRabbit
-
New Features
- Domain-aware session cookies for consistent behavior across subdomains and cross-origin contexts.
- Improved cookie attributes (SameSite and partitioned) for better compatibility and security.
-
Bug Fixes
- Logout and session rotation now reliably clear stale cookies, including subdomain variants.
- Prevents duplicate or lingering cookies by purging legacy non-domain cookies.
-
Tests
- Expanded tests to validate domain-specific set/remove flows and attribute handling across contexts.