Skip to content

pass the full user object to findUsing callback #11

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

Merged

Conversation

joelclermont
Copy link
Contributor

NOTE: this is a breaking change. If anyone is passing a custom callback for findUsing to authenticate, it will need to be updated.

We are trying to support a hybrid login for an existing Laravel application where a subset of users (on a certain domain) use WorkOS, and the rest use the local login logic. We needed to customize findUsing to look up a user based on email, not just the workos_id, but we were unable to do it since the callback was only being passed the id.

createUsing and updateUsing deal with full user objects, so this also adds symmetry to the findUsing method.

I'd normally add/update tests with a PR, but I don't see any tests. I'd be happy to build out test coverage, but that would be a separate PR.

@ckeller03
Copy link

Thanks @joelclermont. I like the consistency with this change so that all the methods use the full user object, makes a lot of sense!

@taylorotwell taylorotwell merged commit 0919ab7 into laravel:main Aug 15, 2025
9 checks passed
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.

3 participants