Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vedantmgoyal9/wwebjs-firebase-storage
A remote authentication plugin for whatsapp-web.js, using Firebase Storage to securely store WhatsApp multi-device session data.
https://github.com/vedantmgoyal9/wwebjs-firebase-storage
firebase firebase-storage hacktoberfest whatsapp whatsapp-web-js
Last synced: 6 days ago
JSON representation
A remote authentication plugin for whatsapp-web.js, using Firebase Storage to securely store WhatsApp multi-device session data.
- Host: GitHub
- URL: https://github.com/vedantmgoyal9/wwebjs-firebase-storage
- Owner: vedantmgoyal9
- License: mit
- Created: 2024-11-11T17:51:44.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-01-09T17:38:04.000Z (8 days ago)
- Last Synced: 2025-01-09T18:40:54.449Z (8 days ago)
- Topics: firebase, firebase-storage, hacktoberfest, whatsapp, whatsapp-web-js
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/wwebjs-firebase-storage
- Size: 179 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# wwebjs-firebase-storage
![NPM Version](https://img.shields.io/npm/v/wwebjs-firebase-storage)
![NPM Downloads](https://img.shields.io/npm/dy/wwebjs-firebase-storage)
![GitHub License](https://img.shields.io/github/license/vedantmgoyal9/wwebjs-firebase-storage)A remote authentication plugin for whatsapp-web.js, using Firebase Storage to securely store WhatsApp multi-device session data.
### Quick Links
- [whatsapp-web.js](https://github.com/pedroslopez/whatsapp-web.js)
- [Firebase Console](https://console.firebase.google.com)
- [Cloud Storage for Firebase (Documentation)](https://firebase.google.com/docs/storage)### Installation
```bash
npm install wwebjs-firebase-storage
```### Example usage
```typescript
import { Client, RemoteAuth } from 'whatsapp-web.js';
import { initializeApp, getStorage, FirebaseStorageStore } from 'wwebjs-firebase-storage';
import qrcode_terminal from 'qrcode-terminal';
const app = initializeApp({
apiKey: ,
projectId: ,
storageBucket: ,
});
const client = new Client({
authStrategy: new RemoteAuth({
store: new FirebaseStorageStore({
firebaseStorage: getStorage(app),
sessionPath: 'sessions-whatsapp-web.js', // save in a sub-directory
}),
backupSyncIntervalMs: 600000, // 10 minutes
}),
... // other options
});
client.on('qr', qr => {
qrcode_terminal.generate(qr, {small: true});
});
client.on('remote_session_saved', () => console.log('Remote session saved!'));
client.on('authenticated', () => console.log('Authenticated!'));
client.on('auth_failure', () => console.log('Authentication failed!'));
client.on('ready', () => console.log('Client is ready!'));
client.initialize();
```