# Unable to find a algorithm for key

**URL:** <https://community.auth0.com/t/unable-to-find-a-algorithm-for-key/79328>\
**Category:** Get Help\
**Tags:** jwt\
**Created:** [March 5, 2022, 8:23am UTC](https://community.auth0.com/t/unable-to-find-a-algorithm-for-key/79328 "2022-03-05T08:23:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![faheem2920](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/faheem2920/32/35655_2.png) [@faheem2920](https://community.auth0.com/u/faheem2920)\
**Post date:** [March 5, 2022, 8:23am UTC](https://community.auth0.com/t/unable-to-find-a-algorithm-for-key/79328/1 "2022-03-05T08:23:57Z")

</div>

Hi there, I have developed an API with FAST API and I have also added JWT auth with it and it is working fine on the localhost but it is giving me an error when I deployed it on the Heroku server. This error occurs when I try to access data from a protected endpoint.

**jwt.exceptions.PyJWKError: Unable to find a algorithm for key: {‘alg’: ‘RS256’, ‘kty’: ‘RSA’, ‘use’: ‘sig’, ‘n’:**

---

<div class="post-metadata">

**Author:** ![dmelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dmelo/32/38778_2.png) [@dmelo](https://community.auth0.com/u/dmelo)\
**Post date:** [July 15, 2022, 2:50pm UTC](https://community.auth0.com/t/unable-to-find-a-algorithm-for-key/79328/3 "2022-07-15T14:50:10Z")

</div>

I have just ran into this problem. Have you found a solution?

---

<div class="post-metadata">

**Author:** ![vmakinen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vmakinen/32/39068_2.png) [@vmakinen](https://community.auth0.com/u/vmakinen)\
**Post date:** [August 19, 2022, 11:09am UTC](https://community.auth0.com/t/unable-to-find-a-algorithm-for-key/79328/4 "2022-08-19T11:09:47Z")

</div>

I faced this error already in my local developement environment so probably not related but in case someone else ends up reading this thread after googling the error message:

In my case I just didn’t have “cryptography” installed. `pip install cryptography` was all that was required.

---

<div class="post-metadata">

**Author:** ![hassan.k.athumani](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hassan.k.athumani/32/44944_2.png) [@hassan.k.athumani](https://community.auth0.com/u/hassan.k.athumani)\
**Post date:** [June 22, 2023, 11:09am UTC](https://community.auth0.com/t/unable-to-find-a-algorithm-for-key/79328/5 "2023-06-22T11:09:27Z")

</div>

I was facing the same problem too and your solution has helped me. Thank you.

---

<div class="post-metadata">

**Author:** ![btech1990](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/btech1990/32/48536_2.png) [@btech1990](https://community.auth0.com/u/btech1990)\
**Post date:** [July 4, 2023, 3:17am UTC](https://community.auth0.com/t/unable-to-find-a-algorithm-for-key/79328/6 "2023-07-04T03:17:00Z")

</div>

Installing cryptography fixed the issue for me as well! thanks !

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 4, 2023, 11:53am UTC](https://community.auth0.com/t/unable-to-find-a-algorithm-for-key/79328/7 "2023-07-04T11:53:51Z")

</div>

Teamwork makes the dream work! Thanks for sharing!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 7, 2023, 8:21am UTC](https://community.auth0.com/t/unable-to-find-a-algorithm-for-key/79328/8 "2023-07-07T08:21:21Z")

</div>


