Social Network Authentication: Merging Accounts

Posted by Unknown on Tuesday, July 15, 2014

In this part, we will have a look at how we can make sure people don’t have multiple accounts after signing into our application through different means.


Merging accounts


If you allow users to sign up through different social networks and perhaps your own registration system, there is a good chance some users will have multiple accounts. How annoying can it be for a user who signed up through Facebook earlier, to come back later and log in through Twitter because he thought he used that one?We can prevent this by letting the user merge manually or try to use an automatic system to try and identify duplicated users.


Setup


I suggest a setup of two database tables. The first table is the general user table, which contains all information about the user.



CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`password` varchar(255) DEFAULT NULL,
`firstname` varchar(50) NOT NULL,
`lastname` varchar(50) NOT NULL,
`emailaddress` varchar(50) NOT NULL,
`city` varchar(50) NOT NULL,
`birtdate` date NOT NULL,
`gender` varchar(10) NOT NULL,
PRIMARY KEY
(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


Note: As you can see, I used the fields that we also used in our SocialLoginInterface. You might need more or less fields depending on your application. You even could decide to split this table in a user and user_profile table if you wish.


The second table contains all data regarding any third party logins the user used.


Continue reading %Social Network Authentication: Merging Accounts%




more

{ 0 comments... » Social Network Authentication: Merging Accounts read them below or add one }

Post a Comment

Popular Posts