noaxis
noaxis3mo ago

sveltekit auth guides?

I’m trying to work my way through Convex’s auth options and the docs seem to be React-centric. Does anyone know of guides or demos using sveltekit? Either Convex Auth or Clerk?
8 Replies
Convex Bot
Convex Bot3mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
Clever Tagline
Clever Tagline3mo ago
There are several other threads in here on this topic. Search the channel for "Svelte" and you'll find them pretty easily.
bear
bear3mo ago
@noaxis I just set up auth with convex-auth and sveltekit you can search the discord like Tagline suggests, but odds are you'll come up short your best bet is reading the react auth code and porting it
noaxis
noaxisOP3mo ago
thanks, yeah i searched the threads but it was mostly just other people asking the same thing 🙂 do you have a repo you can share?
bear
bear3mo ago
no https://gist.github.com/remcoplasmeyer/c2a7dcb8f4d802701d42c4f067a2cf9c here's my LoginForm.svelte and here's my getUserState.svelte.ts https://gist.github.com/remcoplasmeyer/ee14d3e9e3d3276b9d616a04fdbddb49 the code is very ugly and will be refactored, but contains the minimal to get auth working particularly client.setAuth is a hard requirement for convex to send authenticated calls
Clever Tagline
Clever Tagline3mo ago
Sorry for the misdirection. I had assumed that at least one of those other threads would contain useful info.
bear
bear3mo ago
they do! but they're also confusing since people mix and match lots of auth solutions and some are even already using outdated packages (e.g. lucia v2) let me know if you have any questions @noaxis in the meanwhile I'll be implementing refreshing my token ;p
noaxis
noaxisOP3mo ago
thanks guys that's perfect, i'll dig into it more

Did you find this page helpful?