Next.js Discord

Discord Forum

Use of getToken in ServerComponent, is this safe?

Answered
Egyptian Mau posted this in #help-forum
Open in Discord
Egyptian MauOP
https://github.com/nextauthjs/next-auth/pull/5792

I saw this github issue and wonder if this is safe, in the docs it says you should always call getServerSession with the same config you init your NextAuth with, this solution however violates that.
Answered by Barbary Lion
The same thing is returned to the client, I would say it's equally safe.
View full answer

3 Replies

Egyptian MauOP
Push
Egyptian MauOP
Push
Barbary Lion
The same thing is returned to the client, I would say it's equally safe.
Answer