t
tRPC
[Help] Fastify session http only cookie differs - tRPC
M
tRPC
•
13mo ago
•
3 replies
Mr. Joker
[Help] Fastify session http only cookie differs
message.txt
5.36KB
Solution
The problem is probably with fastify
/fastify session plugin
.
fastify
.register
(session
,
{
secret
:
"supersecret1234567890supersecret1234567890
"
,
/
/ Use a strong secret here for production
.
cookie
:
{
secure
:
"auto
"
,
/
/ THIS WORKED
(Even though
'auto
' must set secure to false if http localhost
)
secure
: false
,
/
/ THIS DIDN
'T WORK
httpOnly
: true
,
maxAge
: 1000
* 60
* 60
* 24
,
sameSite
: process
.env
.NODE
_ENV
=
=
=
"production
"
?
"strict
"
:
"none
"
,
}
,
saveUninitialized
: false
,
}
)
;
Jump to solution
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
4,951
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Throwing fastify errors when using fastify adapter
R
rd / ❓-help
3y ago
Auth0 + fastify + tRPC
T
Ted (he/him) / ❓-help
3y ago
How can I access the session in fastify when using `useWSS: true`?
M
MrJohz / ❓-help
12mo ago
Fastify + TRPC on Vercel
B
brumbrum_brum / ❓-help
2y ago