Skip to content

Conversation

@thomasballinger
Copy link
Contributor

Testing with https://workos-convex-nextjs-testbed.previews.convex.dev/server-does-not-work (code) the current approach sometimes fails, particularly in prod.

We'd like to do something better here but for now this separate layouts appraoch seems necessary.

nicknisi added a commit that referenced this pull request Sep 16, 2025
Remove dependency on accessToken presence for determining authentication state.
With eagerAuth enabled, we can rely solely on user presence to determine if
authenticated, eliminating race conditions between user and token availability.

Changes:
- Remove accessToken from useAccessToken destructuring
- Determine isAuthenticated based only on !!user
- Simplify the authentication flow by removing unnecessary token checks

This addresses the issues raised in PR #10 about authentication reliability,
particularly in production environments.
nicknisi added a commit that referenced this pull request Sep 16, 2025
* Simplify authentication state management

Remove dependency on accessToken presence for determining authentication state.
With eagerAuth enabled, we can rely solely on user presence to determine if
authenticated, eliminating race conditions between user and token availability.

Changes:
- Remove accessToken from useAccessToken destructuring
- Determine isAuthenticated based only on !!user
- Simplify the authentication flow by removing unnecessary token checks

This addresses the issues raised in PR #10 about authentication reliability,
particularly in production environments.

* update to authkit-nextjs v2.7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant