Auth client in Next server actions - always getting 401
Hi!
I'm trying to use the auth client in a next server action, but any api I hit on the server side is always unauthorized. Is there some way to configure the auth client with the user's server-side session?
I know I can do
Also, I know I can run these on the client, but there is a very specific reason this specific call is on the server.
I'm trying to use the auth client in a next server action, but any api I hit on the server side is always unauthorized. Is there some way to configure the auth client with the user's server-side session?
I know I can do
auth.api.doThing but I'd greatly prefer to use the auth client for the sake of consistency.Also, I know I can run these on the client, but there is a very specific reason this specific call is on the server.