Social Login Implementation \ Login page
In this part you will discover how to integrate Social Login in order to let users login with their existing accounts from over thirty different social networks such as Facebook, Google, Twitter, Yahoo, Instagram and LinkedIn amongst others.
The library must be present only once on each page. If you have already implemented another of our services, then you might already have added the corresponding code. In this case you can skip this section.
It is compatible with pages served using both HTTP or HTTPS.
// before the path to the library is a protocol-independent absolute path, which detects whether your site uses HTTP or HTTPS.
No modification of the code on secure pages is required.
Our recommendation is to add this code snippet to your website template so that it appears before the closing
</head> tag. As it is loaded asynchronously, you can however add it basically anywhere in your template.
8. Add Social Login to your login page.
Update the template of your login page and add the following code at the place where you would like Social Login to be displayed.
Make sure to replace
#callback_uri# by the full URL pointing to the script created during the setup.
The UI goal should be that users can easily identify that they can login with their social network account, but that users without a social network account can continue to login normally without being confused.
9. Setup the callback script.
The callback script that you have created for your registration page can handle the registration of new users as well as the login of existing users. You do not need to create a new callback script.
10. Make a final test.
Users should now be able to first create a new account on your website using a social network account
and then login with that social network account. For your final tests you should first of all remove all entries from the
Then first login with a social network account on your registration page and make sure that your system creates a new
account, populates the
oneall_user table and logs you in.
Then logout and login with a social network account on your login page. Make sure that your system finds a match
oneall_user table and logs you in with the corresponding account.
Once everything is working as expected, you should continue with the Social Link implementation in order to allow your existing users to link their accounts to one or more social network accounts.