This is a template of a SvelteKit project which authenticates users stored in MongoDB. No auth library is used.
Users can register, log in, open a dashboard (which is just a placeholder here), and visit an account page. On the account page, their name and email can be changed, and logout is possible.
The users are stored in a MongoDB Atlas database. Authentication is implemented with JSON web tokens which are stored as HTTP-only cookies. After login, user name and email are stored as cookies as well.