Answer the question
In order to leave comments, you need to log in
What are the methods of authorization through vk/fb/twitter?
Explain the situation, please.
In order to get a token, you need to go through authorization, authorization takes place on the server side of the social network, then you get a get link with a token (this is about VK, with client authorization), but it's not safe to pull a token from the client side and then drag it to your server for requests to the social network api, then server authorization is needed.
Using, say, vksdk for node js, you can in principle get a token, but as I understand it, it will be valid for the application and not for the user, because the following code is used to get it:
// Setup
var VK = require('vksdk');
var vk = new VK({
'appId' : 2807970,
'appSecret' : 'L14ZKpgQPalJdumI6vFK',
'language' : 'ru'
});
/**
* Request server methods
*/
// Setup server access token for server API methods
vk.on('serverTokenReady', function(_o) {
// Here will be server access token
vk.setToken(_o.access_token);
});
Answer the question
In order to leave comments, you need to log in
Passport.js
www.passportjs.org/docs
example strategy for authorization using VK
https://github.com/stevebest/passport-vkontakte#readme
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question