Laravel Suspicious Login Detection: Scoring and Blocking Risky Sign-Ins
A correct password alone does not confirm the account owner, since credential stuffing and phished passwords both produce successful logins. The article proposes scoring login signals such as device, network, country and prior failed attempts, so that several weak indicators can be combined before any action is taken. It recommends three response levels: silently logging low-risk logins, emailing users a 'Was this you?' check for medium risk, and requiring a second verification step for high risk. Blocking outright on weak signals is discouraged because it locks out legitimate users, such as those travelling or using VPNs. The author compares building a custom solution with using the spatie/laravel-suspicious-login package, noting that the package's checks, default scores and caveats were reviewed from its documentation but not installed or run.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in