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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file verify_firebase_token-0.1.3.tar.gz.

File metadata

  • Download URL: verify_firebase_token-0.1.3.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.10 Darwin/23.2.0

File hashes

Hashes for verify_firebase_token-0.1.3.tar.gz
Algorithm Hash digest
SHA256 763a48d3bc6ec97396d4525abff28e460df37e680788cbdd9f8359c4325754df
MD5 36491a191edee9206bf2b3faaa9e127a
BLAKE2b-256 8b4b8e34ee704881c359185ca868dad527b259ae0af2a6e0d6217dc200435e1f

See more details on using hashes here.

File details

Details for the file verify_firebase_token-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for verify_firebase_token-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 20e5e58af0dbf2b8480a4e8feeaeb776a07b66dd6af47c23313355cd82af8697
MD5 fca3120b8fb49b16c0518867e3e70182
BLAKE2b-256 cbb21f13caf5ce8effb4a4a717d84721fc8d3eca78913d52f6f8dd755e571c2a

See more details on using hashes here.

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