Skip to content

boxfish/meteor-accounts-wechat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meteor Acccounts Wechat

Wechat account login for meteor with support on ios and android.

##Install

meteor add boxfish:accounts-wechat

Cordova Integration

This package uses Cordova plugin (https://github.com/xu-li/cordova-plugin-wechat) on mobile devices to fetch the authorization code. To use it, the AppId needs to be set in the mobile.config:

App.configurePlugin('cordova-plugin-wechat', {
    WECHATAPPID: '<WECHATAPPID>'
});

Setup and Usage

  1. Configure the WeChat service with appId and secret
    ServiceConfiguration.configurations.update(
      { "service": "wechat" },
      {
          $set: {
              "service": "wechat",
              "appId": <your-app-id>,
              "secret": <your-app-secret>
          }
      },
      { upsert: true } // If doesn't find wechat, insert one
    );
  1. Login using WeChat
      Meteor.loginWithWeChat(function (err, res) {
          if (err) {
            console.log('success ' + res);
          }
          else {
            console.log('login failed ' + err);
          }
      });

License

MIT

Contributors

See original package contributors

See current package contributors

About

Login service for WeChat accounts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published