Skip to content

aolyang/next-ts-auth-example

Repository files navigation


NextAuth.js Example App

Open Source. Full Stack. Own Your Data.

npm Bundle Size Downloads TypeScript

Overview

This repo is a migration template from next-auth-example, the old deployed version can be found at next-auth-example.vercel.app

And it is using NextJS 13 experimental appDir features

  • Next 13 + Typescript
  • Next-Auth
  • Prisma and Database for persistent (coming soon)
  • Docker for one command self-host (coming soon)
  • Self-host blog system (keep attentions on flowmos organization, it will soon)

Create Your Own Now

1. use this template or clone directly, and install

git clone https://github.com/aolyang/next-ts-auth-starter [your directory]
cd next-ts-auth-starter [or your directory]
pnpm install # you can remove the lock file and install your version

2. Configure your local environment

cp .env.local.example .env.local

Add details for one or more providers (e.g. Google, Twitter, GitHub, Email, etc).

Example for github:

  1. Go to Settings/Developer settings page https://github.com/settings/developers
  2. create a new auth app use localhost:port for your dev environment
  3. Copy the client id and secrets, paste into .env.local
  4. pnpm dev can start this repo

3*. Database is not required

if you don't want to persist user accounts and to support email sign in, skip it.

more details see NextJS official website

About

next 13 + next-auth + ts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published