Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT]: Email Notification for Account Login Events #645

Open
7 tasks done
idehen-divine opened this issue Mar 2, 2025 · 0 comments
Open
7 tasks done

[FEAT]: Email Notification for Account Login Events #645

idehen-divine opened this issue Mar 2, 2025 · 0 comments

Comments

@idehen-divine
Copy link

idehen-divine commented Mar 2, 2025

Description

Implemented a system that sends email notifications to users whenever they log into their accounts. The notification includes detailed information about the login event (time, IP, location, device) and provides security instructions for unauthorized access attempts.

Key components:

  • Created login notification template that matches existing email styles
  • Implemented location detection for IP addresses
  • Added device and browser detection from user agents
  • Modified login endpoint to trigger notifications via background tasks

Motivation and Context

This feature enhances security by keeping users informed about all account access events. It allows users to quickly detect unauthorized access attempts and take immediate action to secure their accounts.

How Has This Been Tested?

  • Created unit tests for the login notification service
  • Tested with different user agents and devices
  • Verified location detection works for different IP types (including local IPs)
  • Manually tested login flow to ensure notifications are sent correctly
  • Verified email template rendering in different email clients

Screenshots (if appropriate - Postman, etc):

Image

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
@idehen-divine idehen-divine changed the title feat: Email Notification for Account Login Events [FEAT]: Email Notification for Account Login Events Mar 2, 2025
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

No branches or pull requests

1 participant