I'm getting null for getUserIdentity
Any clue why I keep getting null for getUserIdentity. Do I maybe just have something misconfigured?
I'm using the next.js stuff
then I call an action
I'm logged in
this prints null
11 Replies
Do you have both the server provider and the middleware setup? You need everything from "App Router with SSA" tab:
https://labs.convex.dev/auth/setup#set-up-the-react-provider
Or you can switch to using the vanilla react provider (shown in the "App Router without SSA" tab)
Set Up Convex Auth - Convex Auth
Authentication library for your Convex backend
yeah I'm pretty sure I followed that correctly
And how are you ensuring the client is logged in?
If you can share a repo with repro I can have a look.
what is repro?
one sec I'll just make it public
GitHub
GitHub - webdevcody/scary-story-generator
Contribute to webdevcody/scary-story-generator development by creating an account on GitHub.
yeah I've gone over my code a few times, I can't see where I misconfigured this
Repro: “reproduce” or “reproduction” of a bug
I shouldn’t shorten 🙂
same issue here. user is logged in, but
getUserIdentity()
returns nullI reproduced the issue, looking
@Web Dev Cody @Kibru while I'm fixing this please change your
next.config.js
to:
thanks. it works.
@Web Dev Cody @Kibru please upgrade convex and @convex-dev/auth to latest for the fix