firebase_ui
Firebase UI is a Drupal module that integrates Firebase push notifications directly into the Drupal backend. It enables administrators to send notifications to authenticated users, specific users, or user roles, with options for immediate or scheduled delivery. The module includes a backend UI for easy configuration and management, allowing you to send and manage notifications effortlessly.
Features
- Backend UI for:
- Sending notifications to all active users or specific users/roles
- Scheduling notifications for future delivery
- Pausing/resuming notifications
- Resending notifications
- Auto-management of
field_firebase_tokenson the user entity - Invalid token cleanup and token management
- Scalable notification delivery via queue (processable via cron or Drush)
- Admin UI for configuring Firebase credentials
- Compatible with Firebase Web SDK (
firebase.messaging())
Requirements
- Drupal 10+
- Firebase project with Firebase Cloud Messaging (FCM) enabled
- PHP libraries installed via Composer:
composer require google/auth guzzlehttp/guzzle
Installation:
Install the module via Composer and Drush:
composer require drupal/firebase_ui drush en firebase_ui -y
Configuration:
Navigate to /admin/config/services/firebase-ui/settings and enter your Firebase project credentials: apiKey, projectId, messagingSenderId, appId, vapidKey
Sending Notifications:
To send a notification, go to /admin/config/services/firebase-ui/send.
- Choose the recipients (All Users, Specific Users, or Roles)
- Set the notification schedule (Immediately or Scheduled Date/Time)
- Enter the title (max 50 characters) and message (max 150 characters)
Managing Notifications:
To manage notifications, go to /admin/config/services/firebase-ui/list.
- View, pause/resume, and resend notifications.
Drush Support:
Manually process the notification queue with Drush: drush queue:run firebase_ui_notification_queue Or wait for Drupal cron to process it automatically.
Support:
For any issues or feature requests, please open an issue on the Drupal Firebase UI Project Issue Tracker