Gathering detailed insights and metrics for firebase-express-dashboard
Gathering detailed insights and metrics for firebase-express-dashboard
Gathering detailed insights and metrics for firebase-express-dashboard
Gathering detailed insights and metrics for firebase-express-dashboard
npm install firebase-express-dashboard
Typescript
Module System
Node Version
NPM Version
TypeScript (64.6%)
HTML (33.85%)
Shell (1.55%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2 Stars
116 Commits
1 Forks
1 Watchers
2 Branches
3 Contributors
Updated on Jan 19, 2023
Latest Version
0.5.2
Package Id
firebase-express-dashboard@0.5.2
Unpacked Size
77.78 kB
Size
18.35 kB
File Count
28
NPM Version
8.19.2
Node Version
16.13.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Add CRUD routes that manage Firebase Auth to Express.js.
Also, it exposes a dashboard to manage it all.
See 'src/demo.ts' file to see how to better integrate it into your project.
1import express from 'express'; 2import FB_admin from 'firebase-admin'; 3import firebaseDashboard from 'firebase-express-dashboard'; 4 5const serviceAccount = { 6 type: 'service_account', 7 project_id: process.env.PROJECT_ID, 8 private_key_id: process.env.PRIVATE_KEY_ID, 9 private_key: process.env.PRIVATE_KEY, 10 client_email: process.env.CLIENT_EMAIL, 11 client_id: process.env.CLIENT_ID, 12 auth_uri: 'https://accounts.google.com/o/oauth2/auth', 13 token_uri: 'https://oauth2.googleapis.com/token', 14 auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs', 15 client_x509_cert_url: process.env.CLIENT_X509_CERT_URL, 16}; 17 18const firebaseInstance = FB_admin.initializeApp({ 19 credential: FB_admin.credential.cert(serviceAccount), 20 databaseURL: process.env.DATABASE_URL, 21}); 22 23express() 24 .use('/firebaseDashboard', firebaseDashboard(firebaseInstance)) 25 .listen(PORT, () => console.log(`Express - Listening on ${PORT}`));
Then navigate to either of the following to see the dashboard's UI:
The dashboard's UI can be also be embedded in other websites using an iframe.
If the request for the HTML contains a bearer token, then that HTML will use the same bearer token while sending its requests. This means that the following code should be enough to protect the APIs from unauthorized access:
1express() 2 .use( 3 '/firebaseDashboard', 4 (req, res, next) => { 5 if (req.headers.authorization) { 6 const user = authService.convertTokenToUser(req.headers.authorization.replace('bearer ', '')); 7 if (user && user.isAdmin) { 8 return next(); 9 } 10 } 11 return res.sendStatus(401); 12 }, 13 firebaseDashboard(firebaseInstance) 14 ) 15 .listen(PORT, () => console.log(`Express - Listening on ${PORT}`));
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
53 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More