Skip to content

Conversation

@uzair-snap
Copy link

No description provided.

PJ-Snap and others added 13 commits October 8, 2025 12:32
Update import paths in ClerkSessionSynchronizer to use relative paths…
Refactor event handling in ClerkSessionSynchronizer to use ReflexEven…
…ionProfile, OrganizationSwitcher, and OrganizationList

This commit introduces four new components for managing organizations within the Clerk API. Each component includes customizable props for appearance, routing, and navigation after specific actions. The components are designed to enhance user interaction with organization creation, profile management, and switching between organizations.
…te prop names for clarity

This commit renames the 'hide_personal_account' prop to 'hide_personal' for consistency and adds 'hide_slug' and 'organization_profile_props' to both components, enhancing their configurability for organization management.
…l options

This commit refines the CreateOrganization, OrganizationProfile, OrganizationSwitcher, and OrganizationList components by updating prop types to use more specific types, including the addition of 'skip_invitation_screen' and 'hide_slug' options. These changes improve clarity and configurability for organization management within the Clerk API.
…onments

Frontend (ClerkSessionSynchronizer):
- Fix useEffect deps: [isSignedIn] -> [isLoaded, isSignedIn, addEvents, getToken]
- Add reconnect-safe resend via dedupe guard keyed on (stateKey, addEvents identity)
- Request fresh token with skipCache:true to avoid near-expiry tokens
- Clear session on token fetch failure to prevent stuck auth_checked=false

Backend (ClerkState.set_clerk_session):
- Add 60s leeway to JWT validation for clock skew tolerance
- Catch ExpiredTokenError (in addition to existing InvalidClaimError/MissingClaimError)
- Return clear_clerk_session on validation failure instead of raising
- Add set_jwt_validate_leeway_seconds() for downstream configuration

Tests:
- Add unit test for ExpiredTokenError -> clear session path
- Add JS string assertion for correct deps array and skipCache

Fixes: Authentication timeout after max attempts, auth not ready after timeout,
ExpiredTokenError crashes in set_clerk_session
@uzair-snap uzair-snap closed this Jan 9, 2026
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.

2 participants