Optionally email a user if they are logging in on a "new" device

Created on 4 November 2016, almost 8 years ago
Updated 30 July 2024, 2 months ago

This seems like a nice feature for the security to protect accounts in ways related to the cyber. This feature is enabled by Add device detection/ID provided by modules: fingerprintjs2 Downport .

There are potentially a lot of scenarios. I'm going to tackle just one of them for now.

Account is created for the user - don't send an email b/c the only information we have is about the admins account, not the user.

On a first login for account:
- old device id is blank (cookie is not set)
- new device id is detected/set, no prior data for this uid in login_history
-so- don't send an email

subsequent login on a device, with device id cookie, browser has been updated:
- old device id is set and authentic
- new device id does not match - send new device id
-so- don't send an email

subsequent login on a device, cookies were cleared:
- old device id is not set/valid
- new device id matches a prior login based on querying login_history for this device_id and uid
-so- don't send an email

subsequent login, cookies are cleared or invalid:
- old device id is not set/valid
- new device id is not found in login_history for this uid but there are prior logins for this uid
-so- do send an email!

The final scenario could also happen because the person is logging in from a legitimately new device OR because an attacker has stolen their credentials. it's particularly this last scenario that we want to protect against, but we want to do that while sending as few emails as possible.

Feature request
Status

Downport

Version

2.0

Component

Code

Created by

🇺🇸United States greggles Denver, Colorado, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024