t
tRPC
R
tRPC
•
4y ago
•
9 replies
Rhys
tRPC Cors Authentication Error
Hey
, I was mainly looking to enable CORS locally for calling my tRPC endpoints in
l
o
c
a
l
h
o
s
t
:3000
(NextJS
) from
l
o
c
a
l
h
o
s
t
:6006
(Storybook
)
I followed this doc
https://trpc.io/docs/cors
and this section of the advanced usage to enable cors
https://trpc.io/docs/api-handler#advanced-usage
but I
'm getting the following error
CORS No Allow Credentials
CORS No Allow Credentials
- Removing the
credentials: include
credentials: include
fixes this
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials
however then I
'm unable to use authenticated endpoints
What I
'm looking to do is call my authed endpoints on
l
o
c
a
l
h
o
s
t
:3000 from
l
o
c
a
l
h
o
s
t
:6000
, has anyone had experience with this
?
Relevant repository code
:
Next
-
https://github.com/AnswerOverflow/AnswerOverflow/tree/message-result-page/apps/nextjs
Storybook
-
https://github.com/AnswerOverflow/AnswerOverflow/tree/message-result-page/packages/ui
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
tRPC CORS error
A
Answer Overflow / ❓-help
15mo ago
trpc cors
O
oscaramaッ / ❓-help
3y ago
Getting CORS error with tRPC express adapter, locally
R
rhh4x0R / ❓-help
16mo ago
nextjs middleware trpc authentication
C
chico / ❓-help
16mo ago