Next.js Discord

Discord Forum

cant use `SessionProvider` in root layout to be able to get session in client side

Unanswered
Polar bear posted this in #help-forum
Open in Discord
Polar bearOP
Why cant i use SessionProvider in server side but [this](https://github.com/nextauthjs/next-auth-example/blob/main/app/client-example/page.tsx#L18) example can?

2 Replies

Satin Angora
Not sure, in its current version it is a client component. But the example you've linked they use:
"next-auth": "beta",

In their package.json, maybe thats going to change in a future update?