# `PhoenixKit.Users.Auth.KnownDevice`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.213/lib/phoenix_kit/users/auth/known_device.ex#L1)

A device (IP + hashed user-agent) a user has previously logged in from.

Backs the new-login security alert: a login whose `(ip_address,
user_agent_hash)` pair has no matching row for the user is a "new
device" and — when `new_login_alert_enabled` is on — triggers
`user.new_login_detected` in the activity log plus an email via
`PhoenixKit.Users.Auth.UserNotifier.deliver_new_login_alert/2`.

The user agent is stored pre-hashed (SHA-256 hex, via
`PhoenixKit.Utils.SessionFingerprint.hash_user_agent/1`) — the raw UA
string is never persisted.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
