Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@firebase/app-check-compat

Package Overview
Dependencies
Maintainers
4
Versions
1109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firebase/app-check-compat

A compat App Check package for new firebase packages

  • 0.3.17
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8M
decreased by-3.06%
Maintainers
4
Weekly downloads
 
Created

What is @firebase/app-check-compat?

The @firebase/app-check-compat package is designed to work with Firebase App Check in a way that is compatible with the older Firebase JavaScript SDKs. It helps in protecting your Firebase resources from abuse, such as billing fraud or phishing, by ensuring that only your apps can access your Firebase services.

What are @firebase/app-check-compat's main functionalities?

Initialize App Check with reCAPTCHA

This code initializes Firebase App Check using a reCAPTCHA provider. It helps in ensuring that the client interacting with your Firebase services is a legitimate instance of your app, by solving a CAPTCHA challenge.

import firebase from 'firebase/app';
import 'firebase/app-check';

// Initialize Firebase app
firebase.initializeApp({
  apiKey: 'your-api-key',
  authDomain: 'your-auth-domain',
  // other config
});

// Initialize App Check with reCAPTCHA provider
const appCheck = firebase.appCheck();
appCheck.activate('your-recaptcha-public-key', true);

Integrate with Firebase services

This code demonstrates how Firebase services like Authentication and Firestore can be used normally after integrating App Check. App Check works in the background to secure these requests.

import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/firestore';

// Assuming App Check and Firebase app have been initialized

// Use Firebase services as usual
firebase.auth().onAuthStateChanged(user => {
  console.log(user);
});

firebase.firestore().collection('users').get().then(snapshot => {
  snapshot.forEach(doc => console.log(doc.data()));
});

Other packages similar to @firebase/app-check-compat

FAQs

Package last updated on 14 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc