Articles
Latest
More
Newsletter Sponsorship Discord About
Sign up for our Newsletter
The video for this lesson is currently being updated, please read the transcript instead.
Enterprise Vue > Lesson 42

Auth middleware

Let's now abstract the authentication code from the GET /users endpoint so it can be used with any route we create.

We're going to do this by creating our own custom middleware.

You'll recall that middleware is a hook into your request/response loop, that can transform the request or response objects. For example, we added the body-parser middleware to Express which transforms the request body from a stream to a JavaScript object.


Back to course page

Click to load comments...

Articles
  • Latest
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

Vue.js Developers © 2021. View our privacy policy .

  • RSS
  • |
  • Atom