SvelteKit Surreal Auth
Credit where it's due
NGL I was pretty lost when I started this out due to how surrealdb interacts with the server AND THE CLIENT DIRECTLY!!
and the repo below helped me greatly develop an implementation that JUST WORKED... check it out here
What is this
A basic bare bones implementation of surrealdb auth in a sveltekit app, nothing more
DB Connection Implementation
Development/Local Implementation
If you are a madman that has a public domain pointed to your home internet, use the prod guide lol
How to run
- point database (surreal container name in this proj) to 127.0.0.1 through /etc/hosts
- docker compose up
- then sign into the root under db: ssa and ns: ssa
- run the surql script given here
- run the project with bun/yarn/pnpm/npm anything
- /login and /register would be the urls of your interest
- after registration, you'd be redirected to login page
- after login you should see a console log in the inspector about the user you signed in with
How to run
- configure your vps nginx to point to the apps in the project through your domain
- docker compose -f prod.docker-compose.yml up
- then sign into the root under db: ssa and ns: ssa
- run the surql script given here
- run the project with bun/yarn/pnpm/npm anything
- /login and /register would be the urls of your interest
- after registration, you'd be redirected to login page
- after login you should see a console log in the inspector about the user you signed in with