rappasoft / laravel-authentication-log

Log user authentication details and send new device notifications.
MIT License
783 stars 95 forks source link

Fixed issue with getting previous login at and previous login IP. #49

Closed codebyray closed 2 years ago

codebyray commented 2 years ago

When using:

auth()->user()->previousLoginAt();
// or
auth()->user()->previousLoginIp();

They currently do not skip ALL failed login attempts.

For instance, if there is a failed login attempt prior to the current successful login, it will retrieve and return the failed login details.

With this pull request it will fix that issue and skip the failed login attempts and give the true successful previous login.