A Sveltekit starter template with built-in authentication and UI using Lucia Auth.
Report bugs/features via github issues, or more easier is to simply hit me up on discord.
It's quite limited at the moment, but it will get you started quickly with 3 Auth methods (Google/Github/Email+password).
planetscale support only at the moment.
No built-in ORM. Gives you the freedom to integrate your own.
Clone > install deps > read docs!
Clone | git clone [email protected]:TheCodingAtlas/sveltekit-auth-starter.git |
Install | pnpm install |
Develop | pnpm start (start the dev sever) |
Build | pnpm run build |
Preview | pnpm run preview (run the prod version locally) |
Run the code from mysql.sql
once you are connected to your planetscale database(tutorial) via Sequal ace and you are good to go.
Strongly recommend using nvm and setting up shell integration.
The entire codebase is commented throughout, just dive in. If you have trouble understanding something, hit me up and I will help you.
There are some changes I made in comparison to Lucia.
user_keys
to user_providers
. It makes more sense as they talk about OAuth providers
in their docs.You will need separate OAuth apps for Local/Production!
# .env
GITHUB_CLIENT_ID="..."
GITHUB_CLIENT_SECRET="..."
You will need separate OAuth apps for Local/Production!
For local testing you can blast through the setup using the steps below.
If you want to go live you will have to do more setup work.
App name
support email
Developer contact information email
all the way belowadd or remove scopes
scopes
as in the img and saveback to dashboard
button below.Credentials
item in the siderbarCREATE CREDENTIALS
OAuth client ID
Web application
[myapp]-local
http://localhost:5173
http://localhost:5173/login/google/callback
client id
and client secret
from the popup into your .env file:# .env
GOOGLE_OAUTH_CLIENT_ID="..."
GOOGLE_OAUTH_CLIENT_SECRET="..."
GOOGLE_OAUTH_REDIRECT_URI="..."
[No roadmap yet]
Ideas: