Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] fix auth when using a custom authentication pipeline in Fortify #379

Merged

Conversation

joelbutcher
Copy link
Owner

@joelbutcher joelbutcher commented Oct 3, 2024

Fixes a bug where, when using Fortify::authenticateThrough in a service provider, the auth for Socialstream fails and kicks users out of the application (e.g. to the My Account page for Google OAuth).

The problem is fixed by iterating over the pipes used by Fortify (or in the custom callback) and replacing Fortify's instances of AttemptToAuthenticate and RedirectIfTwoFactorAuthenticatable with our own.

Resolves #378

Note

This does not solve the problem where developers create their own custom authentication implementations and don't use fortify's at all

@joelbutcher
Copy link
Owner Author

@miguilimzero this should solve your issue

@joelbutcher joelbutcher added the bug Something isn't working label Oct 3, 2024
@joelbutcher joelbutcher merged commit 62c5097 into 6.x Oct 3, 2024
38 checks passed
@joelbutcher joelbutcher deleted the fix/auth-with-fortify-authenticate-through-callback branch October 3, 2024 16:11
@miguilimzero
Copy link
Contributor

@joelbutcher I didn't have time to test it yet, but it looks like it will work seamlessly. Thank you for the prompt fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug where custom fortify pipeline is impossible with Socialstream
2 participants