No video

Login to Salesforce using Gmail/Google credentials. Define a Google Auth Provider in Salesforce!!!

  Рет қаралды 1,806

Khan’s Tech Videos

Khan’s Tech Videos

10 ай бұрын

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

Пікірлер: 12
@galbollus
@galbollus 10 ай бұрын
Hello. When i did the Social Sign-On with Facebook trailhead it redirects to an Apex Class that creates a new user instead of checking if the user already exists. Is there any correct way or is it dependent on the client requirements?
@codewith_Khan
@codewith_Khan 10 ай бұрын
The apex class which is generated automatically just contains the template of creating new user and that apex class need to be updated accordingly as per the clients requirement. If the requirement is to only allow login to those whose user exists in Salesforce then you can use my code that I have provided in the description. Thanks
@galbollus
@galbollus 10 ай бұрын
Ok, thats what i was thinking. Tks for the reply :)@@codewith_Khan
@codewith_Khan
@codewith_Khan 5 ай бұрын
Please subscribe the channel if not done already.
@AshishKumar-my3lm
@AshishKumar-my3lm 7 ай бұрын
for me ,registration handler did not have hyper link to edit it.
@codewith_Khan
@codewith_Khan 5 ай бұрын
Hi, sorry for the delay I hope that was an intermittent issue or are you still facing the issue that I can help? Please subscribe the channel if not done already.
@farukh369
@farukh369 6 ай бұрын
Hi Khan, I would like to know how to login for portal user
@codewith_Khan
@codewith_Khan 6 ай бұрын
Hey bro! for community users you can navigate to your site under All sites and go to Workspaces then select Login and Registration option where you can select Gmail as your login option. Its like enabling Single Sign on for Community users
@vanminhtran413
@vanminhtran413 5 ай бұрын
@@codewith_Khan Thks for the video .Very useful instruction in future for me
@codewith_Khan
@codewith_Khan 5 ай бұрын
Glad it helped. Please subscribe the channel if not done already. Thanks
@Dinesh-fx8nm
@Dinesh-fx8nm 2 ай бұрын
Very helpful thanks bro
@codewith_Khan
@codewith_Khan 2 ай бұрын
Glad it was helpful! Please subscribe the channel if not done already!!
OpenId Connect in Salesforce | SSO Between Google and Salesforce
44:53
Salesforce Apex Hours
Рет қаралды 15 М.
No empty
00:35
Mamasoboliha
Рет қаралды 8 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 15 МЛН
Serialization & Deserialization in salesforce apex
35:25
SFDC Use Cases
Рет қаралды 2,1 М.
What Is Single Sign-on (SSO)? How It Works
4:54
ByteByteGo
Рет қаралды 572 М.
Deep dive into Salesforce Named Credential
57:21
Salesforce Codex
Рет қаралды 7 М.
OAuth with Salesforce - Demystified
36:29
Salesforce Developers
Рет қаралды 18 М.
Lecture 11 : How to setup Auth provider in Salesforce?
7:14
MyTutorialRack
Рет қаралды 1 М.
Setup Salesforce SSO with Azure Active Directory in 15 Minutes
16:56
Single Sign On (SSO) setup in Salesforce - Part 1.
9:04
Khan’s Tech Videos
Рет қаралды 4,2 М.