Get the request header inside a form action? For Solid Start
Let's say I have a login action and I first want to check if the user is already logged in, and if their session is already there (in the db). I want to do something conditionally for that.
5 Replies
SolidStart Release Candidate Documentation
SolidStart Release Candidate Documentation
Early release documentation and resources for SolidStart Release Candidate
SolidStart Release Candidate Documentation
SolidStart Release Candidate Documentation
Early release documentation and resources for SolidStart Release Candidate
GitHub
vinxi/packages/vinxi/runtime/http.js at 6f3d81beabc8cf003c0095eb9b4...
The Full Stack JavaScript SDK. Contribute to nksaraf/vinxi development by creating an account on GitHub.
Handle Cookie - h3
Use cookies to store data on the client.
Of course all of this only works on the server side portion of an action (
"use server"
).There is also an example of how to use h3's session so you don't have to deal with cookies directly.
GitHub
solid-start/examples/with-auth/src/lib/index.ts at main · solidjs/s...
SolidStart, the Solid app framework. Contribute to solidjs/solid-start development by creating an account on GitHub.
Handle Session - h3
Remember your users using a session.