Firebase (Push Notifications)
Web push notifications for time-sensitive auction events. Free for most volumes; works on desktop and mobile browsers.
What gets pushed
| Event | Push? |
|---|---|
| Outbid | yes (instant) |
| Auction ending soon (5 min) | yes |
| Auction won | yes |
| New auction from followed seller | optional |
| Watchlist activity (start/end) | optional |
| Direct message | yes |
Customers opt in via the browser's native push permission.
Configure
Auctions → Settings → Integrations → Firebase
| Field | Where it comes from |
|---|---|
| API key | Firebase Console → Project Settings → Web API Key |
| Auth domain | Firebase Console (looks like your-project.firebaseapp.com) |
| Project ID | Firebase Console |
| Storage bucket | Firebase Console (looks like your-project.appspot.com) |
| Messaging sender ID | Cloud Messaging settings |
| App ID | The Web App registration in Firebase |
| Server key | Cloud Messaging → Server Key |
| Enabled | Master toggle for the integration |
Setup steps
- Create a Firebase project at console.firebase.google.com
- Add a web app — copy the configuration object
- Cloud Messaging → Generate web push certificate (VAPID key)
- Paste each value into the plugin settings
- Enable Firebase
- Save
Customer opt-in
When a customer visits any auction page (with Firebase enabled):
- Browser shows the native permission prompt: "yoursite.com wants to send notifications"
- User clicks Allow
- The browser generates a token; the plugin saves it against the customer's profile
- Subsequent push events use this token to reach that browser
Users can revoke at any time via browser settings; the plugin auto-detects expired tokens and stops sending.
What customers see
| Browser | Look |
|---|---|
| Chrome desktop | Chrome notification with site favicon |
| Safari | Native macOS notification (with Apple Push Notification Service bridge) |
| Firefox | Firefox notification |
| Mobile Chrome | Lock-screen + notification drawer |
| Mobile Safari | iOS lock-screen (PWA installation required for iOS) |
The notification body is customizable per trigger.
Push templates
Default templates ship with the plugin and can be customised:
| Event | Title | Body |
|---|---|---|
| Outbid | "You've been outbid" | "{auction title} — bid again before it's too late" |
| Ending soon | "Ending in 5 minutes" | "{auction title} closes soon" |
| Won | "🎉 You won!" | "{auction title} for {amount} — pay now" |
Click action
Clicking a notification opens the auction page (or /my-account/my-auctions/ for general events). Configurable per push.
Cost
Firebase Cloud Messaging is free for unlimited messages. You only pay if you exceed quota for related Firebase services (which most auction sites won't).
Service worker
The plugin auto-registers a service worker at /firebase-messaging-sw.js. This file:
- Receives background push notifications
- Renders them when the tab is closed
- Handles click actions
Service worker scope
The service worker registers at the site root. If your site is at a subpath (/store/), the registration may fail. Configure the worker scope manually if needed.
Testing
Send a test push from Firebase Console → Cloud Messaging → Send your first message. Use the token saved in the user's meta as the recipient.
Common questions
"Why isn't push working on iOS?"
iOS requires PWA installation for web push to work. Add a Web App Manifest to your site (use a PWA plugin) and prompt users to "Add to Home Screen". Once installed as a PWA, push works.
"Tokens expire — how do I clean up stale ones?"
The plugin auto-cleans tokens that Firebase reports as expired or invalid. For a manual sweep run Tools → Maintenance → Clean stale Firebase tokens.
"Push vs Email — which should I use?"
Push for immediate, time-sensitive events (outbid, ending soon, won). Email for summary / reference content (digests, payment confirmations, withdrawal status). Use both for highest-value events (auction won).
