Skip to main content

No project description provided

Project description

verify-firebase-token

Just one file that verifies Firebase Authentication ID tokens, replacing firebase_admin.verify_token.

I made this because:

  1. firebase_admin is a massive library and I was only using it for decoding jwt tokens.
  2. firebase_admin.verify_token constantly calls Google's servers for CERTS. I made an in memory cache for this.

Dependencies

  1. PyJWT for jwt verifying and parsing
  2. cryptography for extracting the public keys from Google's certificates
  3. requests for getting Google's certificates

Installation

$ pip install verify-firebase-token

Verifying tokens

from verify_firebase_token import verify_token

result = verify_token("<TOKEN>", "<FIREBASE_PROJECT_ID>")

The result is a dictionary with the JWT payload. If the token cannot be verified, the raw JWT errors will be raised.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verify_firebase_token-0.1.3.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

verify_firebase_token-0.1.3-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page