Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

serverless-tencent-auth-tool

anycodes504Apache2.0.1

Tencent Cloud Auth Tools For Serverless Framewoek

Tencent Cloud, Serverless Framework, Cloud function

readme

使用方法

腾讯云相关的在Components中使用:

在Pacakge中导入:

"serverless-tencent-auth-tool": "^0.0.5"

在项目代码中:

const tencentAuth = require('serverless-tencent-auth-tool')
const auth = new tencentAuth()
this.context.credentials.tencent = this.context.credentials
  ? await auth.doAuth(this.context.credentials)
  : await auth.doAuth(this.context.instance.state.status)

系统会根据需求自动进行一键登录/获取AppId以及判断是否已经实名认证