Date post: | 22-Apr-2015 |
Category: |
Technology |
Upload: | yuji-yasuno |
View: | 1,776 times |
Download: | 0 times |
Social Login with Salesforce Communities
Yuji Yasuno Sales Support Engineer
/yuji.yasuno
@yuji_yasuno
in/yujiyasuno
Agenda
• Values • The Big Picture of Social Login with Communities • Setup • Setup for Mobile
Identity Provider
Identity Provider gives power to communities letting users login with SNS Account
Values
• Social Login can help the registration, username and password problem, and provide useful profile data.
• Social Login delivers value both to consumers and companies. ‣ Makes registering and logging into a site much easier.
‣ Grants permission-based access to profile data that can be used personalize the users’ experience.
✴ These are quotation from The Value of Social Login(http://www1.janrain.com/rs/janrain/images/Industry-Research-Value-of-Social-Login-2013.pdf).
The big picture - use case
1. Try to login into salesforce with using Facebook ID.2. OAuth Authorization.
4. Return the user profile data
3.Request user’s profile data.
5. Return the communities’ page
Remarks This point actually has a few HTTPS requests but I only put one arrow so that easy to understand use case.
The big picture - architecture
Request a profile data
Return a profile data
salesforce
Identity Provider gives profile data to registration handler(Apex)
The registration handler manages the User object records. (required to write the code for deciding how to create or update a user)
User
Setup - step1
• Create a Auth. Provider Setting > Administrator > Security Controls > Auth. Providers
Don’t forget to set Registration Handler(you can create automatically by clicking link).
Setup - step2
• Enable Options of Auth. Provider login in Communities’ Login Page setting. Setting > Build > Customize > Communities > Manage Communities >(select your a community) > Login Page
Enable the option that you made from Auth. Provider
Setup for Mobile - step1
• Same as the previous pages’ setup instructions of step1 and step2.
• Create a Connected Apps.
Mobile SDK needs these information.
Setup for Mobile - step2
• Change login domain of your mobile application.
Change Login Host to Custom Host and set the value as Communities domain. *Don’t forget put / and community name after domain.
Finally
You can login using Facebook account!
Remarks
If you want to change behavior of login, i.e. changing how to update user data referring SNS profile and decide how to create a user for registration, please change the registration handler that is automatically created. <http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_auth_plugin.htm>