JSPM

@cloudflare/turnstile-firebase-app-check

0.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1283
  • Score
    100M100P100Q121313F

An App Check provider using Cloudflare Turnstile

Package Exports

  • @cloudflare/turnstile-firebase-app-check
  • @cloudflare/turnstile-firebase-app-check/src/index.ts

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cloudflare/turnstile-firebase-app-check) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

turnstile-firebase-app-check

This repository leverages the cloudflare-turnstile-app-check-provider Firebase extension, and offers an implementation of a CustomProvider using Firebase App Check tokens.

Sample code

const app = initializeApp(firebaseConfig);

const siteKey = 'YOUR-SITEKEY';
const HTTP_ENDPOINT = '${function:function-name.url}';

const cpo = new CloudflareProviderOptions(HTTP_ENDPOINT, siteKey);
const provider = new CustomProvider(cpo);

initializeAppCheck(app, { provider });

Note: the firebase function must be using the aforementioned extension.