# Flask sample app login fails: Missing jwks\_uri in metadata

**URL:** <https://community.auth0.com/t/flask-sample-app-login-fails-missing-jwks-uri-in-metadata/74230>\
**Category:** Get Help\
**Tags:** jwt, flask\
**Created:** [December 4, 2021, 12:32am UTC](https://community.auth0.com/t/flask-sample-app-login-fails-missing-jwks-uri-in-metadata/74230 "2021-12-04T00:32:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Calybyte](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/calybyte/32/33468_2.png) [@Calybyte](https://community.auth0.com/u/Calybyte)\
**Post date:** [December 4, 2021, 12:32am UTC](https://community.auth0.com/t/flask-sample-app-login-fails-missing-jwks-uri-in-metadata/74230/1 "2021-12-04T00:32:12Z")

</div>

Hi everyone,

I am new to Auth0 and I have been reading various docs and tutorials. I had no problems with the FastAPI tutorial, but I’m stuck in the Flask tutorial. Here’s what I did:

- Downloaded the example project from the GitHub link at [Auth0 Python SDK Quickstarts: Login](https://auth0.com/docs/quickstart/webapp/python/01-login)
- Created a regular web application in my Auth0 dashboard and configured the callback and logout URLs (localhost)
- Installed Flask and all dependencies
- Renamed .env.example to .env
- Updated .env with my app’s client\_id, domain, client\_secret and more
- Ran Flask locally on port 3000 and visited localhost:3000

I can see the homepage and the login button, but when I press login I get the following error:

```auto
{
  "message": "Missing \"jwks_uri\" in metadata"
}

```

I guess the app can’t find the JSON Web Key Set? I know where I can find that URL in my Auth0 dashboard, but where do I add it in the sample app?

Thanks in advance for your help.

Cheers,

Paul

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 17, 2021, 12:22am UTC](https://community.auth0.com/t/flask-sample-app-login-fails-missing-jwks-uri-in-metadata/74230/3 "2021-12-17T00:22:38Z")

</div>

Hi @Calybyte,

Welcome to the Auth0 Community!

First, could you please clarify the version of the _authlib_ library that you are using?

If you’re using an older version, I recommend updating to _authlib version 0.15.5_ and see if that resolves your issue: `pip install --upgrade authlib`

There is also a related [Github issue](https://github.com/lepture/authlib/issues/403) that has suggested a workaround to this issue.

Additionally, it may be worth it to try going to the [Auth0 Python SDK Quickstarts: Login](https://auth0.com/docs/quickstart/webapp/python/01-login), logging in, and downloading the sample directly.

Doing this will automatically populate your environment variables, and you can select the same application which has already configured the `http://localhost:3000/callback` URLs.

When I tested this earlier, that was the method I took and did not have issues logging in.

If all these workarounds still did not resolve your problem, I recommend opening an issue on Github for further support.

Please let me know if there’s anything else I can do to help.

Thank you.

---

<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 1, 2022, 12:22am UTC](https://community.auth0.com/t/flask-sample-app-login-fails-missing-jwks-uri-in-metadata/74230/4 "2022-01-01T00:22:47Z")

</div>

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