Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 1.19 KB

README.md

File metadata and controls

42 lines (25 loc) · 1.19 KB

Express server with Passport and OAuth

This demonstrates a fairly minimal third-party OAuth (including API auth using JWT and HTTP-only cookies).

Install

git clone https://github.com/dev-academy-challenges/passport-oauth-demo.git
cd passport-oauth-demo
npm install

Setup

mv .env.example .env
  • Edit .env to include your Twitter app's keys

Start/debug

npm start
# or npm run debug

You should be able to use Postman to go to http://localhost:3000/api/v1/open because that endpoint isn't protected. However, http://localhost:3000/api/v1/closed is protected, so you shouldn't be able to access it.

Next

Build out the rest of this app experience 😉