firebase / firebase-admin-python

Firebase Admin Python SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
1.02k stars 315 forks source link

app_check.verify_token can also raise PyJWKClientError, but that is not documented #704

Closed dmelo closed 10 months ago

dmelo commented 1 year ago

The documentation of app_check.verify_token states that the method can raise ValueError. But looking into the documentation, we can see that it can also raise an PyJWKClientError.

I believe we should add something like:

PyJWKClientError: If PyJWKClient fails to fetch the signing key

Relevant Code:

from https://github.com/firebase/firebase-admin-python/blob/f0865f7493a2c642d2e551efdf19da1e53c1a8c3/firebase_admin/app_check.py#LL38C1-L38C1:

    Raises:
        ValueError: If the app's ``project_id`` is invalid or unspecified,
        or if the token's headers or payload are invalid.