Closed lordalisat closed 4 months ago
I modified the code in a new PR to apply generally to any registration. You can modify the callback now to use an Authenticatable $user
parameter:
->setRegistrationEnabled(fn (string $provider, SocialiteUserContract $oauthUser, ?Authenticatable $user) => (bool) $user)
See https://github.com/DutchCodingCompany/filament-socialite/pull/80 for the new implementation. It should be available in the next release.
Allow existing users to register a Socialite user, without there being the possibility of registering new users.
Sometimes, you may want to enable users to link their user account, without being able to create new user accounts. A variable (
socialiteRegistrationEnabled
) can be used to enable this behaviour. The functionality forregistrationEnabled
stays the same.