Neftedollar / meteor-accounts-vk

Login OAuth service for VKontakte accounts (https://vk.com)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

meteor-accounts-vk

Login service for VKontakte accounts (https://vk.com).

Usage

  1. Add the package to your project using meteorite:
$ mrt add accounts-vk
  1. Configure vkontakte login service. You can do mannually or using GUI.

    Manually: Just add next code to your config file.

        if (Meteor.isServer) {
            Accounts.loginServiceConfiguration.remove({
                service: 'vk'
            });
        
            Accounts.loginServiceConfiguration.insert({
                service: 'vk',
                appId:   '1234567',      // Your app id
                secret:  'someappsecret' // Your app secret
            });
        }

    GUI:

    • Add accounts-ui package to your project:

      $ mrt add accounts-ui
    • Set {{loginButtons}} into your template

    • Go to your browser, open page with {{loginButtons}}

    • Click on "configure Vk login" button

    • Fill "App Id" and "App Secret" fields in popup window following by instructions

  2. Use Meteor.loginWithVk(options, callback) for user authentication (you can omit options argument).

  3. 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.

Dependencies

  1. accounts-base
  2. accounts-oauth
  3. accounts-ui (if you want to use GUI)

githalytics.com alpha

Bitdeli Badge

About

Login OAuth service for VKontakte accounts (https://vk.com)

License:MIT License