getUserIdentity problem!
Hello everyone,
My concern is about
ctx.auth.getUserIdentity
, meaning i dont understand when does this function get the user data from Clerk?
I sign-up and i call the storeUser function example from the docs, but i call it in a nextjs client component with useEffect and says i'm not authenticated.
It worked once when i tried in an if
block with useConvexAuth's isAuthenticated
, but it's not working anymore.
Also tried using in the if
block with Clerk's isSignedIn, same, for one signup worked, then next instance not working
How could i solve this?5 Replies
BUMP! Once it's working once it's not. What's the matter here? I keep using if blocks, do i need to use await?
Hey @StoicWanderer, could you share the code where you're configuring Clerk? I'm not familiar with Next.js as I use Remix, but might still be able to help.
I was trying out a websocket system where i query data from Convex into the UI and I tried using the same browser for two different user instances and Clerk and Convex wans't having it, so i needed to download another browser to test the multi functionality, as i'm devloping a chat for users.
So, its all good now. I really hope,
But thank you @RJ for offering your help 🙂
Ah ok, interesting. Let us know if you run into any more trouble!
For chrome you can test using different "identities" and with most browsers you can open "incognito" or "private" windows to separate logged in users - they use localStorage, cookies, etc for auth, which don't persist across private tabs & separate google identities