Direct Connect \ Social Login

Social Login allows your users to login and register with their social network accounts and gives you access to the full social network profile data. Social Login can be embedded either by using JavaScript or by using Direct Connect which works without any JavaScript or iFrames.

1. Trigger the social network authentication

To start the authentication with a social network you only need to send yours users to a specific URL called Direct Connect URL. You could for example place that URL on a hyperlink so that users trigger the social network authentication when they click on the link.

		https://#subdomain#.api.oneall.com/socialize/connect/direct/#provider_key#/

Placeholders

Your must replace the following placeholders in the Direct Connect URL by your own values.

Placeholder Description
* #subdomain# The subdomain of your OneAll site.
Example: myshop
* #provider_key# The key of the social network to login with.
Example: twitter, facebook, linkedin, vimeo [...]

Required URL Parameters

You must add the following URL parameters to the Direct Connect URL.

Required URL Parameter Description
* service The service to be used , must be social_login
Example: &service=social_login
* callback_uri The url encoded link to the callback script on your server.
Example: &callback_uri=https%3A%2F%2Fyour-website.com%2Fcallback.php

Upon successful authentication with his social network account, the user is redirected back to the specified callback_uri to which the OneAll API adds the GET parameter connection_token.

The callback_uri is a link to a script hosted your server. The purpose of that script is to read the GET value connection_token and to fetch the user's social network profile data by sending a HTTP request with that token to the Read Connection Details resource of the OneAll API.

Optional URL Parameters

There are a number of optional URL parameters can be added to the Direct Connect URL.

Optional URL Parameter Description
scope Defines the permission scope to request from the social network.
Default: Compiled from the options that you have ticked in your OneAll account.
Example: &scope=user_birthday,user_hometown
force_reauth Set to true to force the user to re-enter his social network credentials.
Default: false
Example: &force_reauth=true
login_data Sets the login data to be used, eg. the OpenID URL.
Default: none
Example: &login_data=http%3A%2F%2Fmy.server.name%2Fopenidserver%2F

2. Retrieve the user's social network profile data

Upon successful authentication with a social network account, users will be redirected back to the callback_uri to which the OneAll API will add the url parameter connection_token. This token uniquely identifies the user's connection with his social network account.

The callback script then uses the connection_token to fetch the user's social network profile data by sending a HTTP request with that token to the OneAll API.

User Contributed Notes