#Convex Auth... Authenticated works but auth.getUserId(ctx) returns null
1 messages · Page 1 of 1 (latest)
is it consistently or only occasionally? there's a general auth debugging guide that can be helpful: https://docs.convex.dev/auth/debug
it is consistently, i'll follow the guide and report back!
(usually it's because your function is not actually inside a component that's wrapped in Authenticated, and so it runs too soon)
Or b/c you don't have it listed as a provider in auth.config.ts - though then it wouldn't render in <Authenticated>
thanks i'll look into it now (busy day)
I have the ConvexClient (with auth) in my root layout and my auth.config.ts untouched
providers: [
{
domain: process.env.CONVEX_SITE_URL,
applicationID: "convex",
},
],
};```
i'm sure i broke something, but i can't find out what :S
After long hours, It seems NextJs is not supported yet, that may be the cause?
Server-side authentication with Next.js is not supported yet. Are you using preloadQuery or fetchQuery?
yup, but i couldn't find how to get the token, the docs only describe clerk and auth0 😦