Implement native username/password authentication
src
directory, create a hooks.server.ts
fileroutes
directory, create a route called login
. In your login +page.svelte
, create form elements for taking in username and password inputs. Create buttons for login and register.
registerValidate
and loginValidate
logout
endpoint.env
file (create if you haven’t done so) that takes in your database URI and user table name.env
file.