In Case of External IDP Not Getting Firstname Lastname and Email In AddUser method of UserRegistrationProvider Interface

I am trying to login via external IDP like google .
My use case is :

  1. I want to save the user to my custom storage provider in case its a new user .
  2. I want to show the user an error and do not allow login.

I have followed and read similar problems here and here but my use case is bit different , I actually want to read the user info sent by idp and save the same to my custom storage and disallow login in case user is already present in DB .

How can i achieve this .
Can anyone suggest a workaround here . I am using KC 17.0

Thanks

Regards
Vijender