#next-auth
5 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in <id:customize>
✅ You can mark a message as the answer for your post with `Right click -> Apps -> Mark Solution`
(if you don't see the option, try refreshing Discord with Ctrl + R)
Yes, using it with the session provider is still fine. Server components can still use cilent providers, see the docs here: https://nextjs.org/docs/getting-started/react-essentials#rendering-third-party-context-providers-in-server-components
I think for me with NextAuth I also setup the middleware, which at that point allowed me to access the session on any Server Component using const session = await getServerSession(authOptions)
I'm not entirely sure if this was necessary to setup the middleware first or not, but I did start working for me after that.
found this interesting and simple to follow tutorial for next-auth within the app directory for server and client side components in case some one founds it helpful 👍🏼 https://codevoweb.com/setup-and-use-nextauth-in-nextjs-13-app-directory/