# How middlewares work in Auth0?

**URL:** <https://community.auth0.com/t/how-middlewares-work-in-auth0/8686>\
**Category:** Get Help\
**Tags:** middleware\
**Created:** [November 7, 2017, 5:22pm UTC](https://community.auth0.com/t/how-middlewares-work-in-auth0/8686 "2017-11-07T17:22:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![juanbarman](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@juanbarman](https://community.auth0.com/u/juanbarman)\
**Post date:** [November 7, 2017, 5:22pm UTC](https://community.auth0.com/t/how-middlewares-work-in-auth0/8686/1 "2017-11-07T17:22:43Z")

</div>

In the React JS tutorial, you use a middleware, where is it coming from ?? I can’t find it in the code ? can’t understand how come it works.

This is exactly the code and this is the page: [The Complete Guide to React User Authentication | Auth0](https://auth0.com/blog/reactjs-authentication-tutorial/)

app.get(‘/api/jokes/celebrity’, authCheck, (req,res) =\> {

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [November 7, 2017, 6:57pm UTC](https://community.auth0.com/t/how-middlewares-work-in-auth0/8686/2 "2017-11-07T18:57:12Z")

</div>

The first code snippet in the _Build The Back-End_ section contains the definition of the `authCheck` middleware assuming that was what you’re referring to.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:57am UTC](https://community.auth0.com/t/how-middlewares-work-in-auth0/8686/3 "2018-03-02T05:57:18Z")

</div>


