-
Notifications
You must be signed in to change notification settings - Fork 4
Fix/auth session sync reliability #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
uzair-snap
wants to merge
13
commits into
TimChild:main
from
snap-analytics:fix/auth-session-sync-reliability
Closed
Fix/auth session sync reliability #18
uzair-snap
wants to merge
13
commits into
TimChild:main
from
snap-analytics:fix/auth-session-sync-reliability
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… fixing duplicate eventLoop Error
Update import paths in ClerkSessionSynchronizer to use relative paths…
…t instead of Event
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.
…he module exports
…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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.