cowboycodr / kiankit

SvelteKit + Supabase starter kit
https://kit.fromkian.com
229 stars 16 forks source link

Rework auth, confirmation page, email & password auth support, and more. #2

Closed cowboycodr closed 6 months ago

cowboycodr commented 6 months ago

I've added Zod with SvelteKit superforms and it seems to be working great. Definitely adds a little bit of necessary complexity, which isn't great. Though I think in the long run this will pay off.

Before this gets merged, I am going to try and simplify the codebase.

I should also probably document it somewhere that now, because Supabase requires an email provider for production, that you need to configure your own SMTP. I would recommend Resend for this.

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kian-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 5:22am
cowboycodr commented 6 months ago

Also solves #1.

cowboycodr commented 6 months ago

Just need to separate login from sign up and this should be good to go.

By default /auth should redirect to /login.

cowboycodr commented 6 months ago

I need to make the buttons of the basic authentication form correlate to the auth page you're on (login/signup)

cowboycodr commented 6 months ago

There's actually quite a bit more here. Error handling could be a bit better. Also need to set up custom SMTP (with resend) in Supabase.

Additionally, we need to make a way for the user to get another confirmation email. I'm thinking we do this on the confirm page.

Back to error handling: the messages are often non-descript and provide no direction. E.g. when you haven't confirmed your email yet, and you go to log in, it just says "Email not confirmed yet." We need a way to intercept this, and maybe toss a link after it that says "Need another email?" or something of that nature.