Standard Laravel events
These events are dispatched on both the JWT bearer and HTTP Basic paths:Custom events
PrincipalAssigned
Dispatched immediately after the principal resolver binds a principal to a guard. Carries the guard name and the resolved principal instance.
DeviceAuthenticated
Dispatched when a device is hydrated from the devices table and bound to the guard during a bearer or refresh request. Carries the guard name and the device instance. Listeners on this event may persist request metadata — such as last IP address or user-agent — during the authentication lifecycle.
Refreshed
Dispatched after a successful refresh-token exchange. Implements ShouldDispatchAfterCommit, so it fires only after the rotation database transaction commits. Carries the full contextual surface so activity-log consumers can attribute the refresh without a second round-trip through the guard.
RefreshFailed
Dispatched whenever a refresh-token exchange fails. Carries a RefreshFailureReason backed enum so SIEM consumers can count and alert on failure modes without scraping log messages.
RefreshFailureReason reason codes
RefreshFailed carries a RefreshFailureReason backed enum. Every failure path dispatches a distinct reason code so you can attribute events without ambiguity:
Listening to events
Register listeners in yourEventServiceProvider or using Laravel’s #[AsEventListener] attribute: