V
V
V Sh.2016-03-18 09:05:11
ASP.NET
V Sh., 2016-03-18 09:05:11

How to link different authorization methods in one account?

Good afternoon!
I am developing an application (website) on which I want to provide access via login / password and through various social networks. The question is how to make the system consider the inputs of the same person through different authentication systems as a single account?
Those. a person entered through the form - was displayed on the site as User1. I went through VK - it was displayed on the site as the same User1.
As far as I know, in the user table, each type of login corresponds to a separate line.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
OnYourLips, 2016-03-18
@OnYourLips

The easiest way is to identify by email.
However, it is less secure - if someone steals a user's account on some social network, then he will be able to impersonate him.
Therefore, it is worth creating an internal user account and linking others to it.

D
Dmitry Kovalsky, 2016-03-18
@dmitryKovalskiy

Well, on the Users table with the "login, password" fields, the light did not converge like a wedge. Add a table like UsersInSocial where you store the UserId bindings and account data of the social network associated with this user. When authenticating using the second table, specify who it is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question