Facebook Social Login
This section describes how to configure Facebook application to login in OpenIAM.
1 Create and configure Facebook application
OpenIAM must use http over SSL connection
To use Facebook social login feature you should be registered on https://developers.facebook.com. Then you should create new app in https://developers.facebook.com/apps. Please choose option of new app "for everything else", add display name and app contact email and then click on "Create App ID" and complete the security check. New application will be in development state unless you manage it go live but OpenIAM can work with apps in development with restrictions. On the page of your app click on button 'Products' and select 'Facebook Login', select a platform - Web. Fill the form of the app: site URL ( https://your_openiam_domain). Then read Facebook provided information and complete the quickstart wizard. Then go to tab 'Settings', here you should provide "Valid OAuth Redirect URIs". There should be:
- https://your_openiam_domain/idp/social/facebook/callback And save the changes.
####Important note New Facebook application always launches in development mode, to go live you should follow Facebook procedure. Before you go live only admins can use feature login via Facebook.
Now go 'Settings' -> 'Basic' of your app and make sure you can see App ID and App Secret.
2 Configure OpenIAM
2.1 Create Authentication Provider
In Webconsole use Access Control menu->Authentication Provider->Create new provider. Select Facebook type of provider. Then copy and paste App Id and App Secret from Facebook, fill required fields and save it. Then make sure an appropriate content provider has following URL patterns
- /idp/social/facebook/callback (authorization is disabled, Authentication Rule - None)
- /idp/social/facebook/login (authorization is disabled, Authentication Rule - None, Supported HTTP Methods - POST)
2.2 Prepare users
Each user who might want to login via Facebook should have an identity of managed system that is selected on Auth provider page. In our example it is Google Managed system
3 Test feature
Now on login page you can see blue Facebook button, if you click on it Facebook will ask you to share your info with the app