Skip to content

Add translatability tests for email login notifications - #51

Merged
roble merged 2 commits into
mainfrom
saucebase/sc-245/magic-link-authentication-auth-mo
Aug 24, 2026
Merged

roble merged 2 commits into
mainfrom
saucebase/sc-245/magic-link-authentication-auth-mo

Conversation

@roble

@roble roble commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces a new feature that sends login notification emails to users when they sign in, enhancing account security. It adds a configurable setting that allows administrators to enable or disable these notifications via the authentication settings page. The implementation includes event-driven notification dispatch, localization, and comprehensive tests.

Key changes:

Login Notification Feature Implementation

  • Added a ReturningUserAuthenticated event, which is dispatched after a user logs in through any supported method (standard login, magic link, or social authentication). [1] [2] [3] [4]
  • Introduced a SendLoginNotification listener that sends a LoginNotification email to the user if the feature is enabled in settings.
  • Created the LoginNotification notification class, which includes contextual information (login time, IP address, device details), uses localization, and is queued for delivery.

Settings and Admin Interface

  • Added a login_notification_enabled boolean property to AuthSettings, with a corresponding database migration and UI toggle in the authentication settings page. [1] [2] [3]
  • Updated tests to verify that the setting is present, can be saved, and defaults to disabled. [1] [2] [3]

Localization

  • Added English and Brazilian Portuguese translations for the login notification emails and settings UI. [1] [2]

Testing

  • Added a dedicated feature test for LoginNotification, covering content, localization, queuing, and fallback behaviors.

Controller and Event Integration

  • Updated login-related controllers to dispatch the new event after successful authentication, ensuring notifications are sent consistently across all login methods. [1] [2] [3] [4]

These changes collectively improve user security awareness and provide administrators with control over notification preferences.

roble added 2 commits August 24, 2026 20:36
…-feature-to-send-email-when-login

Renanroble sc 472  auth add feature to send email when login
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 365b2f76-5dc3-4536-bf59-533ba3c535bb


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@roble
roble merged commit 90ed27a into main Aug 24, 2026
11 of 14 checks passed
@roble
roble deleted the saucebase/sc-245/magic-link-authentication-auth-mo branch August 25, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant