luckyyang / nextjs-graphql-github-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub OAuth Demo with NextAuth.js

A simple demo on how to do GitHub OAuth with Next.js and NextAuth.js.

Getting Started

1. Clone the repository and install dependencies

git clone https://github.com/luckyyang/nextjs-oauth-demo-with-github.git
cd nextjs-oauth-demo-with-github
yarn

2. Configure your local environment

Copy the .env.local.example file in this directory to .env.local (which will be ignored by Git):

cp .env.local.example .env.local

Refer to this doc to create personal access token, then put it to .env.local

Refer to this blog to get github Client ID and Client Secret, then put them to .env.local, ignore this if you do not need github oauth.

3. Run

yarn dev

Reference

About


Languages

Language:JavaScript 97.7%Language:CSS 2.3%