Convex Auth: Implementation with Svelte(Kit)
I've just started learning SvelteKit and Convex, and recently (yesterday) began implementing an auth solution with Clerk.
Today, I've woken up to see that Convex Auth is in beta and I feel like the perfect case study – but all the docs are written for React! I'm wondering if Convex Auth is available to use in SvelteKit and, if so, if someone would kindly walk me through the process!
Cheers!
14 Replies
Not supported atm, and it might be a while before we get to Svelte.
I personally recommend React over Svelte, unless you're already very invested into Svelte.
Fascinating! You’re the first I’ve heard of that sentiment; why do you suggest avoiding Svelte in favour of React?
I recently completed a React bootcamp, so I’m rather familiar with it… but pivoted away immediately because of how ‘tangled’ the framework seemed to be. Svelte seemed to be more straightforward, imo; but I’d love to hear yours!
Svelte is great, and eventually we want it to have the same support as React.
Right now Convex works best with React.
On the general Svelte vs React, I'd say Svelte simplifies some simpler scenarios, and can give you out-of-the-box better end-user UX. React is more versatile, and much, much more popular (which comes with wider library and component library support).
Same here ... love svelte and I'll wait for svelte support , hard to go back after trying svelte, especially version 5 🙂 ❤️
I cant wait for Svelte5 to formally release along with a fresh tutorial to introduce Svelte with! I feel like I'm caught between two world atm; but, regardless, I'm not turning my back on the language – just steadily slogging my way through the confusion
Whenever Convex Auth supports Svelte(Kit), I'll be in there right away
Same here ... for now I'm sticking with supabase until we got more convex & svelte support, can't wait for it since I love convex but the auth part restricted to react is a bit of a no go for me rn . ❤️
Convex and Svelte do work really well together!
It's just the Auth aspect where they're prioritising React usability (which makes sense due to the ecosystem's size)
Until Convex Auth is available to Svelte users, you can use Clerk as a substitute for authentication purposes – that's worked great for me, anyway 🙂
the docs state you should use a hook from their react library to check for logged-in/out status on the backend over checking with clerk. Did you have any issues handling this?
https://docs.convex.dev/auth/clerk#logged-in-and-logged-out-views
Convex & Clerk | Convex Developer Hub
Clerk is an authentication platform providing login via
Hi, I also recently try convex and it works amazing with svelte until I reach the auth. I'll be right there when convex auth svelte is available
Helpful to hear! @syarif you can add Clerk or Auth0 today by getting an identity token and calling convexClient.setAuth(token) with it, but that's more steps that we hope this will take in the future.
I want to say I have fallen in love with Convex and will not be using any other databases from here on out. However, I am a Svelte/SvelteKit only dev after discovering it. I am eagerly awaiting more svelte-friendly documentation within Convex. It would help so much!
thanks tom, indeed there could be a way, I'm using firebase auth now and I think I can integrate it. but I like the opiniated database of convex, I want opiniated auth as well 😛
Svelte + 1:1 react convex support is the dream ✨️✨️
anyone have tried to use firebase auth with convex?