Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Http/Requests/AuthKitAuthenticationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function authenticate(?callable $findUsing = null, ?callable $createUsing
avatar: $user->profilePictureUrl,
);

$existingUser = $findUsing($user->id);
$existingUser = $findUsing($user);

if (! $existingUser) {
$existingUser = $createUsing($user);
Expand All @@ -72,10 +72,10 @@ public function authenticate(?callable $findUsing = null, ?callable $createUsing
/**
* Find the user with the given WorkOS ID.
*/
protected function findUsing(string $id): ?AppUser
protected function findUsing(User $user): ?AppUser
{
/** @phpstan-ignore class.notFound */
return AppUser::where('workos_id', $id)->first();
return AppUser::where('workos_id', $user->id)->first();
}

/**
Expand Down