Name | verify-firebase-token JSON |
Version |
0.1.3
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-03-27 21:38:57 |
maintainer | None |
docs_url | None |
author | Jeremy Berman |
requires_python | <4.0,>=3.10 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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
```python
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.
Raw data
{
"_id": null,
"home_page": null,
"name": "verify-firebase-token",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Jeremy Berman",
"author_email": "jerber@sas.upenn.edu",
"download_url": "https://files.pythonhosted.org/packages/8b/4b/8e34ee704881c359185ca868dad527b259ae0af2a6e0d6217dc200435e1f/verify_firebase_token-0.1.3.tar.gz",
"platform": null,
"description": "# verify-firebase-token\n\nJust one file that verifies Firebase Authentication ID tokens, replacing firebase_admin.verify_token.\n\nI made this because:\n\n1) firebase_admin is a massive library and I was only using it for decoding jwt tokens.\n2) firebase_admin.verify_token constantly calls Google's servers for CERTS. I made an in memory cache for this.\n\n## Dependencies\n1) `PyJWT` for jwt verifying and parsing\n2) `cryptography` for extracting the public keys from Google's certificates\n3) `requests` for getting Google's certificates\n\n## Installation\n```\n$ pip install verify-firebase-token\n```\n\n## Verifying tokens\n```python\nfrom verify_firebase_token import verify_token\n\nresult = verify_token(\"<TOKEN>\", \"<FIREBASE_PROJECT_ID>\")\n```\n\nThe result is a dictionary with the JWT payload. If the token cannot be verified, the raw JWT errors will be raised.",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.1.3",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cbb21f13caf5ce8effb4a4a717d84721fc8d3eca78913d52f6f8dd755e571c2a",
"md5": "fca3120b8fb49b16c0518867e3e70182",
"sha256": "20e5e58af0dbf2b8480a4e8feeaeb776a07b66dd6af47c23313355cd82af8697"
},
"downloads": -1,
"filename": "verify_firebase_token-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fca3120b8fb49b16c0518867e3e70182",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 2857,
"upload_time": "2024-03-27T21:38:55",
"upload_time_iso_8601": "2024-03-27T21:38:55.469718Z",
"url": "https://files.pythonhosted.org/packages/cb/b2/1f13caf5ce8effb4a4a717d84721fc8d3eca78913d52f6f8dd755e571c2a/verify_firebase_token-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8b4b8e34ee704881c359185ca868dad527b259ae0af2a6e0d6217dc200435e1f",
"md5": "36491a191edee9206bf2b3faaa9e127a",
"sha256": "763a48d3bc6ec97396d4525abff28e460df37e680788cbdd9f8359c4325754df"
},
"downloads": -1,
"filename": "verify_firebase_token-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "36491a191edee9206bf2b3faaa9e127a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 2436,
"upload_time": "2024-03-27T21:38:57",
"upload_time_iso_8601": "2024-03-27T21:38:57.005703Z",
"url": "https://files.pythonhosted.org/packages/8b/4b/8e34ee704881c359185ca868dad527b259ae0af2a6e0d6217dc200435e1f/verify_firebase_token-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-27 21:38:57",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "verify-firebase-token"
}