Sveltekit auth
does anyone have an example of
sveltekit
with user/pass auth setup + convex? just looking something simply to build off of15 Replies
No example I know of, you'd need to follow something similar to auth0 or clerk or other custom auth setup
I'll rig something before too long, maybe with this simple new auth I keep hearing about 🤔
not this week though
okay thats cool
today in my own project i implemented auth with user password and cookies. its simple and works fine with convex
however its missing things like session expirations and controls..so i might take the time to write my own convex driver for luca auth or just write the auth myself
I do have one with sveltekit and Lucia v3 and convex-ents
It was basically just me messing around and probably isn't a good design
I can public the repo later if you want
if you would like too sure! or you can post the authcode on a
gist
so you dont have to public all of it
im just looking for a starting point to build my own good auth
also my schame.ts
file for my current project has over 15+ tables and a lot of relations, do you think i should convert it to convex-ents? I have never used it so idk the benefits loli just used it because i was messing around with relations. its not needed at all for the auth. the code will be easy to convert. i just like the easy of use i get from it.
ill send the url shortly
cool i will checkout the blog and see if i want to convert my schema to it. thankfully i have not wrote many functions yet for my project
okay
going to upload it now
hopefully its working xd
its just an example an i have no idea what im actually doing so dont have high expectations.
thanks i will take a loot
look
ents looks interesting, however i dont think i will use it. it has some good attractions, but honestly, I still prefer to know, explicitly how my data in my functions are affected, checking logic in function, such as if something was unique or not, or default values myself.
The main feature that I think is interesting is cascading deletes although I think I can implement this myself in my own project by simply writing a few extra hundred lines of code still a very cool project. I just think with how complex I’m making mine. I don’t want to add anymore abstractions
I’d rather write more code and understand how everything works from having experience with convex already versus riding less but giving more control to another library
Completely understandable
I don't have any projects with convex, I just like to test things out so I will have a tiny bit of knowledge when I do make something
The auth can still be used though without ents ofc just gotta replace the definition/imports to the default
I hosted an instance on vercel with rewrites in the vercel.json
thanks for the help. My authentication implementation right now is very very simple and has no features. That’s why I wanted to use email and password with Lucia just to make sure I’m doing everything securely and efficiently so thanks for the help.
i added a simple oauth for github
cool
Any news on auth docs for sveltekit @Tom ?