Giter VIP home page Giter VIP logo

Comments (8)

hiranya911 avatar hiranya911 commented on June 25, 2024 1

You should also try with the latest release of the SDK (2.10.0), which caches public key certificates thereby avoiding calling the above URL on each invocation of verify_id_token().

from firebase-admin-python.

hiranya911 avatar hiranya911 commented on June 25, 2024

I don't quite understand. Are you implying that you're using a too old version of requests? Admin SDK uses requests>=2.13.0, so it will typically install the latest version of requests along with firebase_admin.

from firebase-admin-python.

francbartoli avatar francbartoli commented on June 25, 2024

@hiranya911 you are right. Requests is the latest so I don't know why that is happening. If I understand well there shouldn't be any limitation on the number of requests for the verification of a token

from firebase-admin-python.

hiranya911 avatar hiranya911 commented on June 25, 2024

The above error has nothing to do with exceeding a quota. It's a low-level network error -- possibly a Firewall issue or something of the sorts. Is this something that happens all the time, or only occasionally?

from firebase-admin-python.

francbartoli avatar francbartoli commented on June 25, 2024

It doesn’t happen all the time but actually always if a user with a valid token has performed the same request repeatedly and the routine above checks if it is expired. The issue seems to be related with token verification imho.

from firebase-admin-python.

hiranya911 avatar hiranya911 commented on June 25, 2024

Try sending some GET requests to https://www.googleapis.com/robot/v1/metadata/x509/[email protected] from your Python environment (use the requests library), and see how that works out. The verify_id_token() calls the above URL to download public key certificates, which is what's failing in your case.

from firebase-admin-python.

francbartoli avatar francbartoli commented on June 25, 2024

That's cool and likely one good reason to upgrade the SDK. Give a try and I'll let you know. Thanks @hiranya911

from firebase-admin-python.

francbartoli avatar francbartoli commented on June 25, 2024

Upgrading to latest with cache looks good. Issue disappeared

from firebase-admin-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.