Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@firebase/app-check
Advanced tools
The App Check component of the Firebase JS SDK
The @firebase/app-check npm package is part of the Firebase suite of cloud services designed to protect your Firebase web and mobile backends from abuse, such as billing fraud or phishing. It works by ensuring that only your app's legitimate instances can access your Firebase services.
Initialize App Check with reCAPTCHA
This code initializes Firebase App Check using a reCAPTCHA V3 provider. It helps in defending the Firebase backend by ensuring that interactions are coming from your app's legitimate instances.
import { initializeApp } from 'firebase/app';
import { initializeAppCheck, ReCaptchaV3Provider } from 'firebase/app-check';
const app = initializeApp({ /* your firebase config */ });
const appCheck = initializeAppCheck(app, {
provider: new ReCaptchaV3Provider('your-recaptcha-site-key'),
isTokenAutoRefreshEnabled: true
});
Initialize App Check with Custom Provider
This code snippet demonstrates how to initialize Firebase App Check using a custom token provider. This is useful when you have specific security measures or existing infrastructure that generates tokens for client apps.
import { initializeApp } from 'firebase/app';
import { initializeAppCheck, CustomProvider } from 'firebase/app-check';
const app = initializeApp({ /* your firebase config */ });
const appCheck = initializeAppCheck(app, {
provider: new CustomProvider({
getToken: () => {
// logic to fetch a token from your server
return fetch('/my-server/get-token').then(response => response.json());
}
}),
isTokenAutoRefreshEnabled: true
});
csurf is a middleware for Express applications that provides CSRF token protection. Unlike @firebase/app-check, which is designed specifically for Firebase services, csurf can be used with any web application to add a layer of security against cross-site request forgery attacks.
Helmet helps secure Express apps by setting various HTTP headers. It's not directly comparable to @firebase/app-check, which provides app-specific tokens to protect backend services, but Helmet contributes to overall application security by configuring headers that protect against common vulnerabilities.
This is the Firebase App Check component of the Firebase JS SDK.
This package is not intended for direct usage, and should only be used via the officially supported firebase
package.
FAQs
The App Check component of the Firebase JS SDK
The npm package @firebase/app-check receives a total of 1,167,171 weekly downloads. As such, @firebase/app-check popularity was classified as popular.
We found that @firebase/app-check demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.