Login service for VKontakte accounts (https://vk.com).
Add the package to your project using meteorite:
$ meteor add mrt:accounts-vk
Configure vkontakte login service. You can do mannually or using GUI.
Manually: Just add next code to your config file.
if (Meteor.isServer) {
ServiceConfiguration.configurations.remove({
service: 'vk'
});
ServiceConfiguration.configurations.insert({
service: 'vk',
appId: '1234567', // Your app id
secret: 'someappsecret', // Your app secret
scope: 'email,status', // Your app scope
v: '5.92' // VK API version
});
}
GUI:
Add accounts-ui
package to your project:
$ meteor add accounts-ui
{{> loginButtons}}
into your template{{> loginButtons}}
Use Meteor.loginWithVk(options, callback)
for user authentication (you can omit options
argument).
For customization of new user creation you must set 'createUser' event handler:
if (Meteor.isServer) {
Accounts.onCreateUser(function(options, user) {
user.custom_field = "custom value";
// ...
return user;
});
}
Enjoy!
If this package helped you - STAR it on github. This is not difficult for you, but important for me.
Thanks to these people for their contributions! I appriciate it a lot!