npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cloudbase/framework-plugin-auth

v1.9.7

Published

云开发 Tencent CloudBase Framework Auth Plugin 插件,可以一键设置项目下的登录配置。

Downloads

452

Readme

Tencent CloudBase Framework MP Plugin

Tencent CloudBase Framework Auth Plugin

Github License Npm version issue PRs Welcome star

云开发 CloudBase Framework 框架「登录配置」插件: 通过云开发 CloudBase Framework 框架一键设置环境下的登录配置。

功能特性

  • 支持未登录、匿名登录登录设置
  • 后续会支持开放平台、公众号、账号密码等其他登录方式配置

使用方法

步骤一. 准备工作

具体步骤请参照 准备云开发环境和 CloudBase CLI 命令工具

步骤二. 编写 cloudbaserc.json 配置

framework.plugins 中新增登录插件配置

{
  "envId": "YOU_ENV_ID",
  "framework": {
    "plugins": {
      "auth": {
        "use": "@cloudbase/framework-plugin-auth",
        "inputs": {
          "configs": [
            {
              "platform": "NONLOGIN",
              "status": "ENABLE"
            }
          ]
        }
      }
    }
  }
}

具体配置信息请参考下面的配置文档

步骤三. 一键部署

cloudbase framework deploy

配置

默认情况下仅需要配置 appidprivateKeyPath 即可使用,以下配置参数针对有特殊需求的场景

配置示例

云开发的配置文件 cloudbaserc.json,可在配置文件的 plugins 里修改和写入插件配置

{
  "envId": "YOU_ENV_ID",
  "framework": {
    "plugins": {
      "client": {
        "use": "@cloudbase/framework-plugin-auth",
        "inputs": {
          "configs": [
            {
              "platform": "NONLOGIN",
              "status": "ENABLE"
            }
          ]
        }
      }
    }
  }
}

配置参数说明

configs

必填,类型为数组格式 Array.<Login 对象>

Login 对象

| 属性名称 | 类型 | 长度 | 是否必填 | 描述 | | -------------- | -------- | ---- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | platform | String | 1-32 | 是 | 平台名称,可枚举值:WECHAT-OPEN:微信开放平台;WECHAT-PUBLIC:微信公众平台;QQ-MINI:QQ 小程序;CUSTOM:自定义登录;ANONYMOUS:匿名登录;EMAIL:邮箱登录;NONLOGIN:未登录目前仅支持 ANONYMOUS 和 NONLOGIN | | status | String | 1-32 | 否 | 默认开启,可枚举值:ENABLE;DISABLE。 | | platformId | String | 1-64 | 否 | 第三方平台的 AppID | | platformSecret | String | 1-64 | 否 | 第三方平台的 AppSecret |

更多插件

请访问 CloudBase Framework 插件列表 搭配使用其他插件

文档资料