Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 769 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 769 Bytes

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.