When we login using Facebook it successfully redirects to the Facebook login page and if login username and password are correct then shows the authorisation of the Facebook developer app. when you press okay it goes to the Default Landing/Home Page for customer portal without dismissing the overlay web view displayed by salesforce mobile sdk. Control doesn't transfer back to the ionic cordova app after Facebook login.
Setup: -> On Salesforce
- org with customer portal
- Site created for login to customer portal and the SiteLogin has two buttons "Login" and "Facebook Login"
- Auth. Provider created for Facebook in both Salesforce Setup as well as Facebook developer app.
- When click on "Facebook Login" SiteLogin redirects to the Facebook SSO URL successfully and when authorised on Facebook by the user it comes back to the Landing Page for Customer Portal which is in our case Profile Page.
- Created a Connected app on Salesforce
- set the Callback Url from Auth. Provider to Salesforce Connected app.
-> On ionic cordova salesforce app for iOS
- used the consumer key of the connected app to connect
- Built the app and run on both simulator and device.
For the Hybrid iOS App: This setup works well if used with salesforce login. after successful authentication the overlay login window(with webview) from salesforce mobile sdk and we are able to see our cordova ionic app top screen.
Please help us solving this issue for Facebook login. If you want details of the dev org we can provide the details.