Next.js Discord

Discord Forum

Next Auth Slow Performance

Unanswered
Jumbo flying squid posted this in #help-forum
Open in Discord
Jumbo flying squidOP
How does everyone handle injecting additional data into the session object? I've wrapped my getServerSession with some auth options. Specifically, I have a session callback that fetches some additional user data from other tables and adds it to the session.user. However, this is adding 1.5s to any route that fetches the session object. My question is: Is there a way to increase perfomance here? Or do yall have other strategies of injecting data into the session without slowing it down significantly?

0 Replies