🚑 (auth) Fix bad requests with getSession on server side

This commit is contained in:
Baptiste Arnaud
2023-04-03 16:42:10 +02:00
parent b96a3a6a8e
commit 49071b73b6
39 changed files with 112 additions and 91 deletions

View File

@@ -3,7 +3,7 @@ import { inferAsyncReturnType } from '@trpc/server'
import * as trpcNext from '@trpc/server/adapters/next'
export async function createContext(opts: trpcNext.CreateNextContextOptions) {
const user = await getAuthenticatedUser(opts.req)
const user = await getAuthenticatedUser(opts.req, opts.res)
return {
user,