R
R
rdk2015-08-08 02:51:41
Facebook
rdk, 2015-08-08 02:51:41

What to store on the server for authorization via VK/Facebook/etc?

There is a frontend on AngularJS, in which the user can log in through social networks (using hello.js).
1. First, authorization / authentication takes place in the social network. The social network returns the token.
2. The user is authorized on the site (via SMS confirmation).
3. Token and user ID in the social network are stored in the database.
4. The next time you log in and authenticate on the social network, the returned token is checked against the entry in the database in order to pull out the associated user.
But the token doesn't match. I'm obviously doing something wrong :)
How can I identify a returned user so as not to force him to re-authorize on the site?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2015-08-08
@rdk

The token does not have to match, it is always generated anew. VK returns the user id, use it and pull it out, as well as update the token.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question