imadatyatalah / express-nextjs-oauth-starter

express and Next.js oauth2 starter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Started

First, Install the client and server dependencies:

client:

cd client && npm i
# or
cd client && yarn

server:

cd server && npm i
# or
cd server && yarn

Setup the server

inside server folder:

cp .env.example .env

Then fill environment variables:

You can simply get them by creating a github oauth app, You can follow github docs if you don't know how.

GITHUB_ID=YOUR_GITHUB_CLIENT_ID
GITHUB_SECRET=YOUR_GITHUB_CLIENT_SECRET

Finally, run the development server:

inside server folder:

npm run start
# or
yarn start

Then inside client folder:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

About

express and Next.js oauth2 starter.

License:MIT License


Languages

Language:JavaScript 95.8%Language:CSS 3.2%Language:Shell 1.0%