Experiments >

IdP: Password-based logins

Experiment #22918th June, 2022by Joshua Nussbaum

In this experiment I look at what it takes to build password based logins with SvelteKit.


I built the following endpoints

  • /signup: Signup a new user
  • /signin: Signin with an email and password
  • /signout: Signout to clear cookie
  • /forgot-password: Request a link to reset password
  • /reset-password: Resets password, verifies code


Here’s the code:



  • Took a little more work than expected. Just proves that authentication setup can be work. And it doesn’t even handle edge-cases.
  • Missing confirmation flow
  • Might be able to use Stripe Checkout to collect name and email, then registration just needs password/password confirmation to complete. That cuts down on data-entry.
  • Interceptor functions seem to help a lot: https://twitter.com/joshnuss/status/1537992595392983040
view all experiments

Stay tuned in

Learn how to add more experimentation to your workflow