/worker-appcheck-template

Use Firebase App Check with Cloudflare Workers

Primary LanguageJavaScript

A template for using Firebase App Check to authenticate CF workers requests.

Be sure to replace FIREBASE_PROJECT in appcheck.js with your Firebase project number, available in the project settings.

By default, the act query parameter is checked for a valid JWT generated by the Firebase App Check libraries.

The files in ./custom_jwks, are copied from the jose library, modified to cache Google's JWKS response for 6h using Cloudflare's special fetch options.

Wrangler

To generate using wrangler

wrangler generate projectname https://github.com/chocolatkey/worker-appcheck-template

Further documentation for Wrangler can be found here.