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
Close
Hashes for verify_firebase_token-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5debe99fb483024a2ae12073625e19596e3a7ff392cf84abac6cad13313d4664 |
|
MD5 | a3928b553dad017f4eb39dadb9bf23ac |
|
BLAKE2b-256 | 47cb5ba64bc3a7084e64757f076de111a573b6711e6788e4179d57247d1820fd |
Close
Hashes for verify_firebase_token-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc22dafb0fb13fcc92012bff9cd2b3a46d74b7cd9d0ce81270afbb60edc63897 |
|
MD5 | 3ad10b91706a92f15723d86c5e5fae56 |
|
BLAKE2b-256 | 7bcb20c97504bfc4e12e0970a49e739cfb8d6ab9bc8f3fa78c0eb121f39d54a3 |