You need to sign in to do that
Don't have an account?
Set up social sign-up - Could not find a login to your community using Google.
1) I used use Module3RegistrationHandler.cls as registration handler.
2) I selected Google as login capability for Partners ( cf screenshot below)
However, the challenge fails with the following message :
Challenge Not yet complete... here's what's wrong: Could not find a login to your community using Google.
Anybody can help ?
Thanks :-)

2) I selected Google as login capability for Partners ( cf screenshot below)
However, the challenge fails with the following message :
Challenge Not yet complete... here's what's wrong: Could not find a login to your community using Google.
Anybody can help ?
Thanks :-)
Check if you can log into the community using Google sign on the login page.
And also please consider this point in the same trailhead unit.
From Setup, enter All Communities in the Quick Find box, then select All Communities and click Manage next to the Customers community.
Select Administration, then Login & Registration and you see that Google is now an option.
Select Google and click Save.
To confirm your change, return to your private (incognito) browser and reload the login page. Check that the Google icon appears on the login page.
Hope this helps you!
Please accept my solution as Best Answer if my reply was helpful. It will make it available for other as the proper solution.
Thanks and Regards
Sandhya
All Answers
Check if you can log into the community using Google sign on the login page.
And also please consider this point in the same trailhead unit.
From Setup, enter All Communities in the Quick Find box, then select All Communities and click Manage next to the Customers community.
Select Administration, then Login & Registration and you see that Google is now an option.
Select Google and click Save.
To confirm your change, return to your private (incognito) browser and reload the login page. Check that the Google icon appears on the login page.
Hope this helps you!
Please accept my solution as Best Answer if my reply was helpful. It will make it available for other as the proper solution.
Thanks and Regards
Sandhya
Thanks for you answer which helps. However, I suspect an error in the Challenge description :
"Login to the "Partner" community using your Google account."
should be
"Login to the "Customer" community using your Google account."
"We can’t log you in because of the following error.
REGISTRATION_HANDLER_ERROR: List has no rows for assignment to SObject". and Error Challenge: Challenge Not yet complete... here's what's wrong: Could not find a login to your community using Google.
For information,
1) I used use Module3RegistrationHandler.cls as registration handler.
2) I selected Google as login capability for Partners
Could you help please? Thanks in advance.
Thanks for the tip. I got the same error when I tried logging into the Partner community with my google account. However, based on your comment above, I tried to log into the Customer community with my Google account, and it succeded, and passed the challenge.
Thanks,
Josh
Hi, I am still having this issue. My error message is: We can’t log you in because of the following error.
REGISTRATION_HANDLER_ERROR: List index out of bounds: 0
When I looked at the Apex code provided for the Registration Handler in order to complete the module it seems it is for facebook rather than Google, is this the issue?
https://github.com/salesforceidentity/IdentityTrail-Module3/blob/master/Module3RegistrationHandler.cls
Try to log into the Customer community with your Google account and see.
Hope this helps you!
Thanks and Regards
Sandhya
Hi ToriSansom,
I have the same issue and I change the Registration Handler as following and the challenge is passed and tell me if that help you.
//Set<String> s = new Set<String>{'usernamea', 'usernameb', 'usernamec'};
//if(s.contains(data.username)) {
//return true;
//}
return false;
}
global User createUser(Id portalId, Auth.UserData data){
//The user is authorized, so create their Salesforce user
String googleUser = data.email;
User u = [SELECT Id, username, email, lastName, firstName, alias, languagelocalekey,
localesidkey, emailEncodingKey, timeZoneSidKey, profileId
FROM User WHERE username = :googleUser];
return u;
}
/* old method
global User createUser(Id portalId, Auth.UserData data){
if(!canCreateUser(data)) {
//Returning null or throwing an exception fails the SSO flow
return null;
}
if(data.attributeMap.containsKey('sfdc_networkid')) {
//We have a community id, so create a user with community access
//TODO: Get an actual account
Account a = [SELECT Id FROM account WHERE name='Acme'];
Contact c = new Contact();
c.accountId = a.Id;
c.email = data.email;
c.firstName = data.firstName;
c.lastName = data.lastName;
insert(c);
//TODO: Customize the username and profile. Also check that the username doesn't already exist and
//possibly ensure there are enough org licenses to create a user. Must be 80 characters or less.
User u = new User();
Profile p = [SELECT Id FROM profile WHERE name='Customer Portal User'];
u.username = data.username + '@acmecorp.com';
u.email = data.email;
u.lastName = data.lastName;
u.firstName = data.firstName;
String alias = data.username;
//Alias must be 8 characters or less
if(alias.length() > 8) {
alias = alias.substring(0, 8);
}
u.alias = alias;
u.languagelocalekey = UserInfo.getLocale();
u.localesidkey = UserInfo.getLocale();
u.emailEncodingKey = 'UTF-8';
u.timeZoneSidKey = 'America/Los_Angeles';
u.profileId = p.Id;
u.contactId = c.Id;
return u;
} else {
//This is not a community, so create a regular standard user
User u = new User();
Profile p = [SELECT Id FROM profile WHERE name='Standard User'];
//TODO: Customize the username. Also check that the username doesn't already exist and
//possibly ensure there are enough org licenses to create a user. Must be 80 characters
//or less.
u.username = data.username + '@myorg.com';
u.email = data.email;
u.lastName = data.lastName;
u.firstName = data.firstName;
String alias = data.username;
//Alias must be 8 characters or less
if(alias.length() > 8) {
alias = alias.substring(0, 8);
}
u.alias = alias;
u.languagelocalekey = UserInfo.getLocale();
u.localesidkey = UserInfo.getLocale();
u.emailEncodingKey = 'UTF-8';
u.timeZoneSidKey = 'America/Los_Angeles';
u.profileId = p.Id;
return u;
}
}
*/
global void updateUser(Id userId, Id portalId, Auth.UserData data){
User u = new User(id=userId);
//TODO: Customize the username. Must be 80 characters or less.
//u.username = data.username + '@myorg.com';
//u.email = data.email;
//u.lastName = data.lastName;
//u.firstName = data.firstName;
//String alias = data.username;
//Alias must be 8 characters or less
//if(alias.length() > 8) {
//alias = alias.substring(0, 8);
//}
//u.alias = alias;
update(u);
}
}
I am still having this issue when i tried to complete the challenge of "Set up social sign-up" with google
Apex code on Github seems not work properly.
does anyone have solution ?
REGISTRATION_HANDLER_ERROR: List has no rows for assignment to SObject
Could not find a login to your community using Google.
I can't get past this, it's driving me nuts!! 4 days now...can anyone solve this?
Here are the Steps i have Done
Step 1. As we have come the Customers Community portal r8 :)
you can log into the community using facebook sign on the login page.
Step 2 is Open the Customers portal and click or Enable the Google there and Try to register with Google u vl b logged in and click on the Check Challange ................ your Challange wil ppbe assed
Thanks
Saikumar.N
To be clear: It asks you enable google auth for the "Partner" community, but you need to enable it for the "customers" community that you created through the module, and then google auth to that.
It seems that the problem is in this line: Executing the SOQL, it returns 0 records.
Change the line with solved the "REGISTRATION_HANDLER_ERROR: List has no rows for assignment to SObject" for me.
Hope it helps.
Happy Trailheading :)
I noticed that in the code the static string is called for an Account called Partners and a user profile called Partners. see code below! But! in the trailhead, the instructions stated to create a customer profile, and account.
I clone the external profile and named it partners, created an account called partners, and assigned them access in the community. That worked for me.
rivate static final String ORG_SUFFIX = '.sso.badge.org';
private static final String DEFAULT_ACCOUNTNAME = 'Partners';
private static final String EXTERNAL_USER_PROFILE = 'Partners';
private static final String INTERNAL_USER_PROFILE = 'Standard User';
private static final String TZSID = [SELECT timezonesidkey from User where profile.name = 'System Administrator' LIMIT 1].timezonesidkey
I had the same error. The way to fix that is to log in to your google account and keep the session open. then please try launching the trailhead challenge. You dont have to create a new community but make sure your Social sign on using google account session is active. thanks
I get the below error while enbaling Social Sign on.
We can’t log you in because of the following error.
NO_ACCESS: User was not authorized for the community
Please help.
Thank You
Yogendra.
For me worked that solution, i was missing this part.. in video link starts in 8:34, you will need to configure Domain in quick find as it shows and select google.
https://youtu.be/TT3s5kPD86o?t=514
If you have problem with authentication or you dont find communities in quick find..