Closed jigzstar closed 1 year ago
Using the code from the documentation, I am getting the following error:
App\Providers\AppServiceProvider::App\Providers\{closure}(): Argument #2 ($socialite) must be of type DutchCodingCompany\FilamentSocialite\Facades\FilamentSocialite, DutchCodingCompany\FilamentSocialite\FilamentSocialite given,
Code in AppServiceProvider.php boot method
use Laravel\Socialite\Contracts\User as UserContract; use DutchCodingCompany\FilamentSocialite\Facades\FilamentSocialite; ... FilamentSocialite::setCreateUserCallback(fn (UserContract $oauthUser, \DutchCodingCompany\FilamentSocialite\Facades\FilamentSocialite $socialite) => $socialite->getUserModelClass()::create([ 'name' => $oauthUser->getName(), 'password' => Str::random(32), 'email' => $oauthUser->getEmail(), ]));
I'm so dumb, Nevermind, but for anyone else:
FilamentSocialite::setCreateUserCallback(fn (UserContract $oauthUser) => \App\Models\User::create([ 'name' => $oauthUser->getName(), 'password' => Str::random(32), 'email' => $oauthUser->getEmail(), ]));
Using the code from the documentation, I am getting the following error:
Code in AppServiceProvider.php boot method