A small Python library to verify ID tokens from Firebase Authentication in Google AppEngine. The certificates used for verification are cached using memcache.
This library requires Google App Engine client library (for memcache) and PyJWT (used for JWT parsing)
$ 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.
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.