My Use Case
1. Sales Rep created a customize page for customer.
2. Shared same customize page with customer(Created community user for customer). Customer Email id or username is [email protected] in Sales force community. This page has unique URL
3. Emailed customize unique URL to the customer with community user name and password.
4. User clicks on the link and come to community login page.
5. There are multiple login options are available i.e. Using Sales Force community user, Google, Facebook…..
6. Customer select any Social sign-on method to login with [email protected] email.
7. Customer able to see custom page shared with him.

I am able to integrate community application with social media using Sales Force “Auth. Providers” feature.

My Issue: How to map/find that sales force community [email protected] and socials user [email protected] are same user ?

1 Answer 1


Every Auth Provider gets a registration handler (apex class) that you designate. You can setup whatever logic you wish within the registration handler createUser and updateUser methods to match to an existing user. As it appears from your example that email is a bad matching criteria, you will need to come up with some better matching criteria. createUser can return any external user, including an existing Communities user, or it can create and return (although not insert, that's handled by Implemented class) an entirely new user.

  • Thanks greenstork, I have implemented “Registration Handler”. My main concern is that how can I pass some extra attribute which are available in “Registration Handler” so I can correctly map social user with my own community user. I have used “email” just for concept purpose to show that I like to map unknown social user with any existing community user. One alternate option is to use “Existing User Linking URL” but I don’t like to force user to login in community with community credentials and then clicks on any other link to map user. Sep 4, 2014 at 5:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .