Throughout this lesson, we’ll implement an OAuth application using Node.js. In the workspace to the right, there is a simple website built using Express framework. The application has three routes defined in app.js:

  • /— A public home page that has links to /secret and /login
  • /login— A public page that has a button to login and receives an access token
  • /secret— A protected route that will require an access token to view

Inside the root directory, there is db.js— our in-memory database that we will use for our application.

In the workspace on the right, we have a basic Express application with no authentication implemented.


Explore the project in the workspace to the right. You can run the web app by typing in the terminal:

node app.js

Then, press the “Check Work” button to load the website.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?