How would customers sign in with Google to an Experience Cloud site?
Your confidence:Not rated
Model answer
- Configure an Auth. Provider of type Google (OIDC), with the client ID and secret from Google, and the callback URL Salesforce generates.
- Write a registration handler (
Auth.RegistrationHandler):createUsermatches an existing customer by verified email or creates a person account or contact and an Experience Cloud user;updateUserkeeps details in sync. - Add the provider to the site's login page (Experience Cloud administration โ login and registration).
- Consider account linking for customers who already have a password login, and duplicate prevention across providers.
- Test the full journey in a sandbox with real provider accounts.
โ Key points to hit
โ Red-flag answers
- Trusting unverified emails
- Creating a new user on every login
โช Follow-ups
What happens on the second login?
Salesforce finds the existing link between the provider identity and the user, and calls updateUser instead of createUser.
Can the same customer use Google and a password?
Yes, if both identities link to the same user, which the registration handler and linking process must support.