Рет қаралды 1,806
Configure the Auth. Provider to login to Salesforce org using Gmail/Google credentials. Set up Salesforce SSO with Google as Authentication Provider.
**** Ragistration Handler Apex Class****
//This apex class takes care of returning the signing user given that it exists in Salesforce
global class GmailRegistrationHandler implements Auth.RegistrationHandler{
global User createUser(Id portalId, Auth.UserData data){
User userDet = [SELECT Id,Name,Email,Username FROM User WHERE Email = :data.email LIMIT 1];
system.debug('User '+userDet);
return userDet;
}
global void updateUser(Id userId, Id portalId, Auth.UserData data){
}
}
**********************************************************
#salesforce #google #authentication #gmail #integration