Unable to find a algorithm for key

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’: