How do I set the cookie in the procedure?

I am using the ‘npm create t3-app@latest’ app router. Here I do not want to use nextAuth for authentication, I want to use email address and password. However, Perhaps use NextResponse to implement the following? But how would I set the cookie in the procedure and let the requesting browser set it? https://github.com/gonta1026/next-my-template
const createContext = (req: NextRequest) => {
const response = new NextResponse()
return createTRPCContext({
headers: req.headers,
resHeaders: response.headers,
})
}
const createContext = (req: NextRequest) => {
const response = new NextResponse()
return createTRPCContext({
headers: req.headers,
resHeaders: response.headers,
})
}
する?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server