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:
- firebase_admin is a massive library and I was only using it for decoding jwt tokens.
- firebase_admin.verify_token constantly calls Google's servers for CERTS. I made an in memory cache for this.
Dependencies
PyJWT
for jwt verifying and parsingcryptography
for extracting the public keys from Google's certificatesrequests
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 763a48d3bc6ec97396d4525abff28e460df37e680788cbdd9f8359c4325754df |
|
MD5 | 36491a191edee9206bf2b3faaa9e127a |
|
BLAKE2b-256 | 8b4b8e34ee704881c359185ca868dad527b259ae0af2a6e0d6217dc200435e1f |
File details
Details for the file verify_firebase_token-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: verify_firebase_token-0.1.3-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.10 Darwin/23.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20e5e58af0dbf2b8480a4e8feeaeb776a07b66dd6af47c23313355cd82af8697 |
|
MD5 | fca3120b8fb49b16c0518867e3e70182 |
|
BLAKE2b-256 | cbb21f13caf5ce8effb4a4a717d84721fc8d3eca78913d52f6f8dd755e571c2a |