punnP
Convex Community3y ago
7 replies
punn

storeUser pattern for Clerk is flaky

I followed the storeUser pattern for storing a user with Clerk as the auth provider. One issue I'm running into is inconsistency with the the auth object in MutationCtx. It frequently throws the error below and only occasionally after a few refreshes does the mutation run correctly.

I call storeUser on the client right when the user logs in (redirect after login).

I notice that storeUser is only correctly called after reloading the page again or hotreloading with a filesave.
image.png
Was this page helpful?