passport.use(new VKontakteStrategy(
{
clientID: VKONTAKTE_APP_ID, // VK.com docs call it 'API ID', 'app_id', 'api_id', 'client_id' or 'apiId'
clientSecret: VKONTAKTE_APP_SECRET,
callbackURL: "http://localhost:3000/auth/vkontakte/callback"
},
function myVerifyCallbackFn(accessToken, refreshToken, params, profile, done) {
User.findOrCreate({ vkontakteId: profile.id })
.then(function (user) { done(null, user); })
.catch(done);
}
))