webdevcody / next-drizzle-lucia-sqlite-template

MIT License
230 stars 59 forks source link

Overview

This is a Next.js template which includes the following technology

The point of this template is to allow you to setup a project which has a lot of the necessary authentication functionality out of the box, such as

Running locally

  1. cp .env.sample .env (fill out the necessary information for email support with resend, and your google + github oauth info, more info below)
  2. npm i
  3. npx drizzle-kit push (will create your sqlite database)
  4. npm run dev

Setting up Google Provider

If you want google login, you'll need to setup a google project and create some keys:

  1. https://console.cloud.google.com/apis/credentials
  2. create a new project
  3. setup oauth consent screen
  4. create credentials - oauth client id
  5. for authorized javascript origins
  1. Authorized redirect URIs
  1. Set your google id and secret inside of .env

Setting up Github Provider

TODO

Contributing

I'm hoping to keep this template as slim as possible and only add auth related features. Some future things that might be nice to add in could be MFA, sign out all devices, etc. I'm open to contributions, but please keep that core vision of "just auth related stuff" in mind.