Skip to content

fix: Clean up login event handling#187

Open
bobbyonmagic wants to merge 1 commit intothedevdojo:mainfrom
bobbyonmagic:fix/login-event-handling
Open

fix: Clean up login event handling#187
bobbyonmagic wants to merge 1 commit intothedevdojo:mainfrom
bobbyonmagic:fix/login-event-handling

Conversation

@bobbyonmagic
Copy link
Contributor

Fixes inconsistent login event firing.

Changes

  • Attempting event now passes correct rememberMe value (was hardcoded to false)
  • Added missing Failed event for edge case when user not found after validation
  • Replaced Auth::attempt() with Auth::login() to prevent duplicate events

Why

Previously, events were fired both manually AND internally by Auth::attempt(), causing duplicate Attempting and Failed events. Since credentials are already validated with Auth::validate(), we now use Auth::login() and fire Login event manually.

- Fire Attempting event with correct rememberMe value
- Add missing Failed event for edge case when user not found
- Replace Auth::attempt() with Auth::login() since credentials already validated
- Prevents duplicate Attempting/Failed events from Auth::attempt() internal firing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant