laravel / fortify

Backend controllers and scaffolding for Laravel authentication.
https://laravel.com/docs/fortify
MIT License
1.61k stars 294 forks source link

authenticateUsing called twice #530

Closed webdevnerdstuff closed 5 months ago

webdevnerdstuff commented 5 months ago

Fortify Version

1.21.1

Laravel Version

11.4.0

PHP Version

8.3.3

Database Driver & Version

n/a

Description

The Fortify::authenticateUsing method is triggered twice for each request.

Steps To Reproduce

This is the same issue as this previous issue: https://github.com/laravel/fortify/issues/339

Considering this is in fact a bug, and your Issues queue is empty, would you please considering fixing this as it is a bug and a known problem.

Perhaps having a discussion about it at least without just closing the issue would be helpful, at least for someone/anyone to fix it?

webdevnerdstuff commented 5 months ago

I have attempted a fix to resolve this issue. I'm not sure if it's the best way to do it, but after hours of trying to figure things out, this seems to work.

Pull Request: https://github.com/laravel/fortify/pull/531

driesvints commented 5 months ago

Like said in the previous issue we're not actively pursuing a fix or change here right now. We would appreciate a PR with passing tests that we can maybe have a look at. Thanks

webdevnerdstuff commented 5 months ago

I forgot to send the original PR as draft so added a new PR. Errors and tests passing this time.

https://github.com/laravel/fortify/pull/532