Login Authentication Plugin

Tencent CloudBase Framework Auth Plugin
CloudBase Framework Login Configuration Plugin: Set up login configurations for your current environment with one click via the CloudBase Framework framework.
Features
- Support unauthenticated and anonymous login settings
- Will support configuration for Open Platform, Official Account, username/password, and other login methods
Usage
Step 1: Preparation
Specific steps can be found in Preparing the Cloud Development Environment and CloudBase CLI Command Tool
Step 2: Write the cloudbaserc.json configuration
Add the login plugin configuration in framework.plugins
{
"envId": "YOU_ENV_ID",
"framework": {
"plugins": {
"auth": {
"use": "@cloudbase/framework-plugin-auth",
"inputs": {
"configs": [
{
"platform": "NONLOGIN",
"status": "ENABLE"
}
]
}
}
}
}
}
For specific configuration details, please refer to the configuration documentation below
Step 3: One-Click Deployment
cloudbase framework deploy
Configuration
By default, only appid and privateKeyPath need to be configured for use. The following configuration parameters are for scenarios with special requirements.
Configuration Example
The cloud development configuration file cloudbaserc.json allows modifying and writing plugin configurations in the plugins section of the configuration file.
{
"envId": "YOU_ENV_ID",
"framework": {
"plugins": {
"client": {
"use": "@cloudbase/framework-plugin-auth",
"inputs": {
"configs": [
{
"platform": "NONLOGIN",
"status": "ENABLE"
}
]
}
}
}
}
}
Configuration Parameters Instructions
configs
Required. The data type is an array format Array.<Login object>
Login Object
| Property Name | Type | Length | Required | Description |
|---|---|---|---|---|
| platform | String | 1-32 | Yes | Platform name. Enumerated values:<br>WECHAT-OPEN: WeChat Open Platform;<br>WECHAT-PUBLIC: WeChat Official Account Platform;<br>QQ-MINI: QQ Mini Program;<br>CUSTOM: Custom login;<br>ANONYMOUS: Anonymous login;<br>EMAIL: Email login;<br>NONLOGIN: Non-login<br>Currently only ANONYMOUS and NONLOGIN are supported |
| status | String | 1-32 | No | Enabled by default. Valid values: ENABLE, DISABLE. |
| platformId | String | 1-64 | No | AppID of the third-party platform |
| platformSecret | String | 1-64 | No | AppSecret of the third-party platform |
More Plugins
Please visit the CloudBase Framework plugin list to use other plugins in combination
Documentation Materials
- CloudBase authentication documentation: https://docs.cloudbase.net/authentication-v2/auth/introduce
- CloudBase official website: https://tcb.cloud.tencent.com/
- CloudBase Console address: https://console.cloud.tencent.com/tcb