findForPassport pass different credentials

Posted 1 year ago by itstrueimryan

I'm using Passport for OAuth, and I'm using the password grant type method. I've set up the function findForPassport as such:

public function findForPassport($organizationName, $username) {
        $organizationId = optional(Organization::where('name', $organizationName)->first())->id;

        if ($organizationId === null) return null;

        return $this->where('username', $username)->where('organization_id', $organizationId)->where('confirmed', 1)->first();

This is working great! However, in trying to install my repo on another server, all that is being passed to this method is the username. I have no idea where I set it so that it could send two parameters, as I've searched the project for .findForPassport, organization->name and so on and nothing turns up. I'm assuming I edited something that is not tracked in the repo (some core file), but for the life of me I just can't figure out how I did this originally. Any help is appreciated.

Please sign in or create an account to participate in this conversation.