Backendless provides support for logging in users with Facebook or Twitter credentials. Once logged in, Backendless creates a registered user in its internal user storage and links the Backendless user account with his external social account (see the "socialAccount" column in the Users table on the Data screen). To enable social login, a Backendless backend must be configured with API keys.
Login with Twitter Setup
To obtain your Twitter Consumer key and secret:
- In a browser, navigate to https://developer.twitter.com/en/apps and sign in with your Twitter account.
- Click "Create New App":
- Enter application name and description.
For the Website field use the following value:
For the Callback URLs field use the values shown below, where
REST-API-KEYare the values assigned to your Backendless app.
Login with Facebook Setup
To obtain your Facebook App ID/API Key and App Secret:
- Open https://developers.facebook.com/
- Select an application or create one using the "My Apps" dropdown in the upper right corner.
- Make sure the application is public and available to all users as indicated by the green dot next to the application name:
- Locate the App ID and App Secret in the Settings section and copy the values into the corresponding fields in the Backendless Console (Manage > App Settings > Social Settings).
- IMPORTANT: For the Backendless' "Easy Facebook Login" option make sure to make the following changes:
- Click Settings on your Facebook application page.
api.backendless.cominto the App Domains field.
- Make sure the Contact Email field contains a valid email address.
- If the Website platform is not added, click + Add Platform and select Website.
https://api.backendless.comas the Site URL.
After you make the changes described above, the Settings section should look as shown below:
- Click Save Changes.
- Click the Advanced tab on the Settings section.
- Scroll down to the Client OAth Settings block and enter
https://api.backendless.cominto the Valid OAth redirect URIs field
- Scroll to the bottom of the page and click Save Changes.