Docs
Authentication
Authentication
Let's take a look at the project Authentication.
Powered by NextAuth, the BuouAI boilerplate comes with built-in support for popular sign-in services. With just a few updates to environment variables, you can enable Github sign-in, and email/password sign-in in minutes.
Configure Github OAuth
- New OAuth App.
- Configure OAuth App.
- New Access Token.
Configure Environment Variables
Then you can update your Environment Variables in .env.local(.env.production)
# -----------------------------------------------------------------------------
# App
# -----------------------------------------------------------------------------
NEXT_PUBLIC_APP_URL=http://127.0.0.1:3000
# -----------------------------------------------------------------------------
# Authentication (NextAuth.js)
# You can generate a new secret on the command line with:
# openssl rand -base64 32
# -----------------------------------------------------------------------------
NEXTAUTH_URL=http://127.0.0.1:3000
NEXTAUTH_SECRET=your-secret
GITHUB_CLIENT_ID=your-client-id
GITHUB_CLIENT_SECRET=your-client-secret
GITHUB_ACCESS_TOKEN=your-access-token