How to set cookies when signing in from server?
I'm using Hono+TRPC for backend (running on port:3000) and react router v7 framework for client (running on port:5173).
This is what the sign-in procedure looks like:
It validates the credentials and says sign-in successful, but technically i cant sign in as the cookies are not set.
how do i set the cookies for each endpoint.
3 Replies
The best solution is to use authClient on the client
But if you want do it this way, set the returned headers using the hono context
Yeah, ive solved it
You're creating your routes to fully control auth, right?
I just have the same set of tools
I don't like the thing that when you add a new plugin, a lot of new routes become available