social login with salesforce communities

13
Social Login with Salesforce Communities Yuji Yasuno Sales Support Engineer /yuji.yasuno @yuji_yasuno in/yujiyasuno

Upload: yuji-yasuno

Post on 22-Apr-2015

1.777 views

Category:

Technology


0 download

DESCRIPTION

This material shows how to implement social login for salesforce communities by using Identity Provider. This describes the way to implement that using Facebook Auth. Provider as a example.

TRANSCRIPT

Page 1: Social login with salesforce communities

Social Login with Salesforce Communities

Yuji Yasuno Sales Support Engineer

/yuji.yasuno

@yuji_yasuno

in/yujiyasuno

Page 2: Social login with salesforce communities

Agenda

• Values • The Big Picture of Social Login with Communities • Setup • Setup for Mobile

Page 3: Social login with salesforce communities

Identity Provider

Identity Provider gives power to communities letting users login with SNS Account

Page 4: Social login with salesforce communities

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).

Page 5: Social login with salesforce communities

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.

Page 6: Social login with salesforce communities

The big picture - architecture

facebook

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

Page 7: Social login with salesforce communities

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).

Page 8: Social login with salesforce communities

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

Page 9: Social login with salesforce communities

Setup for Mobile - step1

• Same as the previous pages’ setup instructions of step1 and step2.

• Create a Connected Apps.

Mobile SDK needs these information.

Page 10: Social login with salesforce communities

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.

Page 11: Social login with salesforce communities

Finally

You can login using Facebook account!

Page 12: Social login with salesforce communities

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>

Page 13: Social login with salesforce communities