I have created a community and created an Auth. Provider for google and linkedIn. This SSO are working correctly.
My problem is when I login using gmail a new user is created which is linked to gmail. While when I login using linked In with a new user is created.
But I don't want to create a new user if first name, last name and email are common or same. How will I do this?
For e.g. My one user is linked with gmail which has First Name = Swapnil Last Name = Kale Email = firstname.lastname@example.org
Now If I try to signup with Linked In with information as above First Name = Swapnil Last Name = Kale Email = email@example.com
Two duplicate records are created.
I want to avoid duplicate user creation. How will I achieve this.
What I was thinking is if more same user exist then he will be redirected to vf page to show user with same info. If user already exists then he will select his user and get logged in. Can I redirect to a VF page showing all duplicate users while authenticating?