Skip to content

Commit 726c983

Browse files
maximepvrthafezdivandaritaylorotwell
authored
feat: Allow findForPassport to optionally receive the OAuth client (#10880)
* Modify findForPassport to accept client parameter Updated findForPassport method to include client parameter. * Update passport.md Co-authored-by: Hafez Divandari <hafezdivandari@gmail.com> * Update passport.md Co-authored-by: Hafez Divandari <hafezdivandari@gmail.com> * Update passport.md --------- Co-authored-by: Hafez Divandari <hafezdivandari@gmail.com> Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent ce35837 commit 726c983

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

passport.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,7 @@ namespace App\Models;
848848

849849
use Illuminate\Foundation\Auth\User as Authenticatable;
850850
use Illuminate\Notifications\Notifiable;
851+
use Laravel\Passport\Bridge\Client;
851852
use Laravel\Passport\Contracts\OAuthenticatable;
852853
use Laravel\Passport\HasApiTokens;
853854

@@ -858,7 +859,7 @@ class User extends Authenticatable implements OAuthenticatable
858859
/**
859860
* Find the user instance for the given username.
860861
*/
861-
public function findForPassport(string $username): User
862+
public function findForPassport(string $username, Client $client): User
862863
{
863864
return $this->where('username', $username)->first();
864865
}

0 commit comments

Comments
 (0)