firebase-idtoken

A simple python library for verifying Firebase ID tokens in Google App Engine


Keywords
firebase, token, verification, gae, appengine
License
MIT
Install
pip install firebase-idtoken==1.0.0

Documentation

gae-firebase-idtoken

A small Python library to verify ID tokens from Firebase Authentication in Google AppEngine. The certificates used for verification are cached using memcache.

Prerequisites

This library requires Google App Engine client library (for memcache) and PyJWT (used for JWT parsing)

Installation

$ pip install firebase_idtoken

Please read https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27 for instructions how to include the library in your Google App Engine application.

Verifying tokens

from firebase_idtoken import verify_token

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

The result is a dictionary with the payload. If the token cannot be verified an exception will be raised.