Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 729 Bytes

README.md

File metadata and controls

29 lines (24 loc) · 729 Bytes

微信 Open 平台代发起网页授权

Build Status Coverage Status

使用

const opts = {
  appId,
  scope,
  state,
  redirectUrl,
  componentAppId,
  componentAccessToken,
};
const oauth = new OAuth(opts);

const authorizeUrl = oauth.getAuthorizeUrl({ redirectUrl, scope, state });

Error

Error {
  name: 'WechatOpenOAuthError',
  code: Number, // 错误代码,对应微信的错误代码
  message: String, // 错误信息
}