getting user info on server side

I'm using nextjs for my frontend and expressjs for my backend. How can I get the user info on nextjs server (in my middleware) since the auth server config is on my expressjs backend
2 Replies
sebastian
sebastian2mo ago
You shouldnt do that in the middleware. Normally you just fetch the endpoint (like get-session or make your own) to get the current session. (or use the auth-client if on the client-side)
Voltab
VoltabOP2mo ago
ok great thank you !

Did you find this page helpful?