Skip to content

Commit aee8af1

Browse files
feat: Allow findForPassport to optionally receive the OAuth client (#1866)
* add optional client param to findForPassport function Refactor user retrieval logic to use ReflectionMethod for dynamic argument handling. * hotfix * Add ReflectionMethod import to UserRepository * Move RuntimeException import * Update src/Bridge/UserRepository.php Co-authored-by: Hafez Divandari <[email protected]> * Add clientEntity parameter to findAndValidateForPassport --------- Co-authored-by: Hafez Divandari <[email protected]>
1 parent abfaf30 commit aee8af1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Bridge/UserRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ public function getUserEntityByUserCredentials(
3434
}
3535

3636
if (method_exists($model, 'findAndValidateForPassport')) {
37-
$user = (new $model)->findAndValidateForPassport($username, $password);
37+
$user = (new $model)->findAndValidateForPassport($username, $password, $clientEntity);
3838

3939
return $user ? new User($user->getAuthIdentifier()) : null;
4040
}
4141

4242
$user = method_exists($model, 'findForPassport')
43-
? (new $model)->findForPassport($username)
43+
? (new $model)->findForPassport($username, $clientEntity)
4444
: (new $model)->where('email', $username)->first();
4545

4646
if (! $user) {

0 commit comments

Comments
 (0)