Laravel Security Notifications

Last update: Feb 8, 2022

[WIP] Laravel Security Notifications

Tests Style

This package adds security notifications to warn your users when significant security events occur so that they aren't the next victim of an attacker.

WarnsOfEmailChanges

The Anteris\LaravelSecurityNotifications\Concerns\WarnsOfEmailChanges trait adds an updatingEmail event to your model and automatically sends a notification to the user when their email is changed. Note that the notification is sent to their previous email, not the updated one.

WarnsOfPasswordChanges

The Anteris\LaravelSecurityNotifications\Concerns\WarnsOfPasswordChanges trait adds an updatingPassword event to your model and automatically sends a notification to the user when their password is changed. Note that if their email is changed at the same time, the notification is sent to their previous email, not the updated one, in case an attacker is attempting to change their email as well.

WarnsOfTwoFactorChanges

The Anteris\LaravelSecurityNotifications\Concerns\WarnsOfTwoFactorChanges trait adds an updatingTwoFactorSecret event to your model and automatically sends a notification to the user when their two factor secret is changed. Note that if their email is changed at the same time, the notification is sent to their previous email, not the updated one, in case an attacker is attempting to change their email as well.

Configuring Attributes

To configure the attributes used on the model to determine changes, publish the configuration file with the command:

php artisan vendor:publish --provider="Anteris\LaravelSecurityNotifications\LaravelSecurityNotificationsServiceProvider" --tag=config

Now open the file config/laravel-security-notifications.php and create a record for your model under the models array. For example:

return [
    'models' => [
        App\Models\User::class => [
            'email' => 'some_other_email_attribute',
            'password' => 'some_other_password_attribute',
            'two_factor_secret' => 'some_other_two_factor_attribute',
        ]  
    ]
];

Configuring Emails

To modify the emails sent to your users, publish the blade files by running:

php artisan vendor:publish --provider="Anteris\LaravelSecurityNotifications\LaravelSecurityNotificationsServiceProvider" --tag=views

This will place the blade files in resources/views/vendor/laravelSecurityNotifications.

GitHub

https://github.com/Anteris-Dev/laravel-security-notifications
You might also like...

:computer: Send notifications to your desktop directly from your PHP script

:computer: Send notifications to your desktop directly from your PHP script

About JoliNotif JoliNotif is a cross-platform PHP library to display desktop notifications. It works on Linux, Windows or MacOS. Requires PHP = 7.2 (

May 12, 2022

A very lightweight library to handle notifications the smart way.

A very lightweight library to handle notifications the smart way.

NAMSHI | Notificator Notificator is a very simple and lightweight library to handle notifications the smart way. It took inspiration from other librar

May 9, 2022

Takes care of Apple push notifications (APNS) in your PHP projects.

Notificato Notificato takes care of push notifications in your PHP projects. Italian: notificato è: participio passato English: notified Why use Notif

Apr 17, 2022

A PHP Library to easily send push notifications with the Pushwoosh REST Web Services.

php-pushwoosh A PHP Library to easily send push notifications with the Pushwoosh REST Web Services. First sample, creating a Pushwoosh message // Crea

Jan 27, 2022

Notifications in PHP (notify-send, growl, etc) like that.

#Nod Notifications in PHP (notify-send, growl, etc) like that. ##Examples Letting Nod figure out the best Adapter to use (not recommend ATM, only work

Mar 26, 2019

Sends notifications via one or more channels (email, SMS, ...).

Notifier Component The Notifier component sends notifications via one or more channels (email, SMS, ...). Resources Documentation Contributing Report

May 21, 2022

Send push notifications to apple devices (iPhone, iPad, iPod).

Apple Apn Push Send push notifications to apple devices (iPhone, iPad, iPod). Support authenticators: Certificate Json Web Token Supported protocols:

Apr 26, 2022

This package allows you to send notifications to Microsoft Teams.

This package allows you to send notifications to Microsoft Teams.

Teams connector This package allows you to send notifications to Microsoft Teams. Installation You can install the package using the Composer package

May 6, 2022

Push notifications Library for PHP

Push notifications Library for PHP Supported Protocols Protocol Supported Driver Options APNs (Token Based) ✓ APNs\Token APNs\Token\Option APNs (Certi

Mar 25, 2022
Comments
  • 1. Uncaught ParseError: syntax error, unexpected '|', expecting variable (T_VARIABLE) in .../vendor/anteris-dev/laravel-security-notifications/src/Concerns/WarnsOfEmailChanges.php:35

    Hi, Great package, but got this issue when trying to use it on a laravel app: Uncaught ParseError: syntax error, unexpected '|', expecting variable (T_VARIABLE) in .../vendor/anteris-dev/laravel-security-notifications/src/Concerns/WarnsOfEmailChanges.php:35 I'm using PHP 7.4 Any idea ?

    Reviewed by dukenst2006 at 2021-08-26 23:00
Laravel Subscribable Notifications

Laravel Subscribable Notifications This package allows you to subscribe your app Users to your app Notifications and dispatch them without specifying

Mar 18, 2022
Larafirebase is a package thats offers you to send push notifications or custom messages via Firebase in Laravel.
Larafirebase is a package thats offers you to send push notifications or custom messages via Firebase in Laravel.

Introduction Larafirebase is a package thats offers you to send push notifications or custom messages via Firebase in Laravel. Firebase Cloud Messagin

May 6, 2022
Flexible Flash notifications for Laravel
Flexible Flash notifications for Laravel

Introduction Laravel Notify is a package that lets you add custom notifications to your project. A diverse range of notification design is available.

May 23, 2022
A package to simplify automating future notifications and reminders in Laravel
A package to simplify automating future notifications and reminders in Laravel

Laravel Snooze Schedule future notifications and reminders in Laravel Why use this package? Ever wanted to schedule a future notification to go out at

May 11, 2022
📨 Facebook Notifications Channel for Laravel
📨 Facebook Notifications Channel for Laravel

Facebook Notifications Channel for Laravel This package makes it easy to send notifications using the Facebook Messenger with Laravel. Contents Instal

Apr 13, 2022
Push Notifications using Laravel
Push Notifications using Laravel

laravel-push-notification Push Notifications using Laravel PushNotification::send(['deviceToken1', 'deviceToken2',..], 'Notification Message', 'Action

Apr 6, 2022
Laravel package to enable sending push notifications to devices

Laravel Push Notification Package to enable sending push notifications to devices Installation Update your composer.json file to include this package

Apr 25, 2022
✈️ Whatsapp Notifications Channel for Laravel

Whatsapp Notifications Channel for Laravel This package makes it easy to send Whatsapp notification using Venom API with Laravel. This package was cre

Apr 27, 2022
Send Firebase push notifications with Laravel php framework.

FCM Notification Channel for Laravel Send Firebase push notifications with Laravel php framework. Installation You can install this package via compos

May 21, 2022
Standalone PHP library for easy devices notifications push.

NotificationPusher Standalone PHP library for easy devices message notifications push. Feel free to contribute! Thanks. Contributors Cédric Dugat (Aut

May 9, 2022