Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

easy-wechat-sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-wechat-sdk

A simple library based on the WeChat API that supports getting permission signatures on Node.js.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

easy-wechat-sdk

A simple library based on the WeChat API that supports getting permission signatures on Node.js.

Install

Using npm

npm install easy-wechat-sdk --save

Usage

Website Service => WeChat-JSSDK

Get Permission verification configuration

const url = 'https://test.demo.com/usage/wechat'
const WeChatSDK = require('easy-wechat-sdk')
const WeChatJSSDK = new WeChatSDK('your_appId', 'your_appSecret')
let signPackage = null
try {
    signPackage = await WeChatJSSDK.getSignPackage(url)
} catch(e) {
    //Some exception, such as network error => request timeout.
}

Method

getSignPackage(url)

  • url => {String} The url of current page.(required)
  • return => {Object} permission verification configuration

Permission verification configuration

  • appId => {String} WeChat AppId
  • timestamp => {Number} timestamp, unit is seconds
  • url => {String} the url of current page
  • nonceStr => {String} random string
  • jsapiTicket => {String} Temporary ticket for calling the WeChat JS interface
  • signature => {String} permission signature

WeChat API

The following interfaces are used under the module easy-wechat-sdk

License

easy-wechat-sdk is MIT licensed.

Keywords

FAQs

Package last updated on 01 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc