# \[Solved\]JwksError: Not found.(i don't know why)

**URL:** <https://community.auth0.com/t/solved-jwkserror-not-found-i-dont-know-why/55902>\
**Category:** Get Help\
**Tags:** jwks\
**Created:** [January 8, 2021, 3:50pm UTC](https://community.auth0.com/t/solved-jwkserror-not-found-i-dont-know-why/55902 "2021-01-08T15:50:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikunj321](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nikunj321/32/26758_2.png) [@nikunj321](https://community.auth0.com/u/nikunj321)\
**Post date:** [January 8, 2021, 3:50pm UTC](https://community.auth0.com/t/solved-jwkserror-not-found-i-dont-know-why/55902/1 "2021-01-08T15:50:57Z")

</div>

```
const express = require('express');

const jwt = require('express-jwt'); // validate JWT and set req.user

const jwksRsa = require('jwks-rsa'); // Retrieve RSA key set form a JSON Web Key set(JWSK) endpoint

const checkScope = require('express-jwt-authz'); // validate JWT scopes

require('dotenv').config();

const checkJwt = jwt({

    // Dynamically provide a signing key based on the kid in the header

    // and signing the key provided by JWSK endpoint

    secret: jwksRsa.expressJwtSecret({

        cache: true, // cache the signing signature

        rateLimit: true,

        jwksRequestsPerMinute: 5, // preventing attackers form prventing more than 5 req per minute

        jwksUri: `https://${

            process.env.REACT_APP_AUTH0_DOMAIN

        }/.well-known/jwsk.json`

    }),

    // validate audience and issuer

    audience: process.env.REACT_APP_AUTH0_AUDIENCE, // https://localhost:3001

    issuer: `https://${process.env.REACT_APP_AUTH0_DOMAIN}/`,

    algorithms: ["RS256"]

})

const app = express();

app.get('/public', function(req, res) {

    res.json({

        message: "hello from public API."

    });

});

app.get('/private', checkJwt, function(req, res) {

    res.json({

        message: "hello from private API."

    });

});

app.get('/course', checkJwt, checkScope(["read:courses"]), function(req, res) {

    res.json({

        courses: [

            { id: 1, title: "Building app with react and redux"},

            { id: 2, title: "Creating reusable react component"},

        ]

    });

});

app.listen(3001);

console.log("API server listening on "+ process.env.REACT_APP_API_URL);

```

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 8, 2021, 7:36pm UTC](https://community.auth0.com/t/solved-jwkserror-not-found-i-dont-know-why/55902/3 "2021-01-08T19:36:05Z")

</div>

You have a typo in your jwksURI

---

<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:** [January 23, 2021, 7:36pm UTC](https://community.auth0.com/t/solved-jwkserror-not-found-i-dont-know-why/55902/4 "2021-01-23T19:36:07Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
