Agent skill
auth-tool-cloudbase
Use CloudBase Auth tool to configure and manage authentication providers for web applications - enable/disable login methods (SMS, Email, WeChat Open Platform, Google, Anonymous, Username/password, OAuth, SAML, CAS, Dingding, etc.) and configure provider settings via MCP tools.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/auth-tool
SKILL.md
When to use this skill
Use this skill for CloudBase Auth provider setting, such as:
- Turn on or turn off auth providers, such as Sms, Email, WeChat, Google, Anonymous, Username/password, OAuth, SAML, CAS, Dingding, etc.
- Setup auth provider settings
- Get auth provider settings
How to use this skill (for a coding agent)
-
Confirm CloudBase environment
- Ask the user for:
env– CloudBase environment ID
- Ask the user for:
-
ILoginStrategy interface -
LoginStrategyis a object that contains the following properties:tsinterface ILoginStrategy { AnonymousLogin: boolean; // 是否开启匿名登录 EmailLogin: boolean; // 是否开启邮箱登录方式 UserNameLogin: boolean; // 是否开启用户名密码登录方式 PhoneNumberLogin: boolean; // 是否开启短信登录方式 Mfa: boolean; // 是否开启多因素认证 // 短信验证码配置 SmsVerificationConfig: { Type: 'apis' | 'default' // apis:微搭APIs, default:默认短信 Method: string; // 方法名 SmsDayLimit: number; // 短信发送日限额,如果不设上限,该值为 -1 }; // 密码更新配置 PwdUpdateStrategy: { FirstLoginUpdate: boolean; // 首次登录是否更新密码 PeriodUpdate: boolean; // 是否定期更新 PeriodValue: number; // 定期更新周期的值 PeriodType: 'WEEK' | 'MONTH' | 'YEAR'; // 定期更新周期的时间单位 }; // 多因子登录配置 MfaConfig: { On: 'TRUE' | 'FALSE'; // 是否开启多因子登录 Sms: 'TRUE' | 'FALSE'; // 是否开启短信验证 Email: 'TRUE' | 'FALSE'; // 是否开启邮箱验证 RequiredBindPhone: 'TRUE' | 'FALSE'; // 是否强制绑定手机号 } }
All login scenarios (flat list)
Scenario 1: Get Login Strategy
- Call
callCloudApiwith parameter to get Login Strategy and save theresult.DataasLoginStrategy:
{
"params":{
"EnvId": `env`
},
"service":"lowcode",
"action":"DescribeLoginStrategy"
}
- If
LoginStrategyis empty, then returnfalse. - If
LoginStrategyis not empty, then returnLoginStrategyfilter By ILoginStrategy interface.
Scenario 2: Anonymous Login turn on/off
- Call
callCloudApiwith parameter to get Login Strategy and save theresult.DataasLoginStrategy:
{
"params":{
"EnvId": `env`
},
"service":"lowcode",
"action":"DescribeLoginStrategy"
}
- If
LoginStrategyis empty, then returnfalse. - If
LoginStrategyis not empty, then setLoginStrategy.AnonymousLoginwith boolean valuetrue(Turn on) orfalse(Turn off). - Call
callCloudApiwith parameter toupdate Login Strategy:
{
"params":{
"EnvId": `env`,
...LoginStrategy
},
"service":"lowcode",
"action":"ModifyLoginStrategy"
}
- Return result.
Scenario 3: Username/password Login turn on/off
- Call
callCloudApiwith parameter to get Login Strategy and save theresult.DataasLoginStrategy:
{
"params":{
"EnvId": `env`
},
"service":"lowcode",
"action":"DescribeLoginStrategy"
}
- If
LoginStrategyis empty, then returnfalse. - If
LoginStrategyis not empty, then setLoginStrategy.UserNameLoginwith boolean valuetrue(Turn on) orfalse(Turn off). - Call
callCloudApiwith parameter toupdate Login Strategy:
{
"params":{
"EnvId": `env`,
...LoginStrategy
},
"service":"lowcode",
"action":"ModifyLoginStrategy"
}
- Return result.
Scenario 4: Sms Login turn on/off
- Call
callCloudApiwith parameter to get Login Strategy and save theresult.DataasLoginStrategy:
{
"params":{
"EnvId": `env`
},
"service":"lowcode",
"action":"DescribeLoginStrategy"
}
- If
LoginStrategyis empty, then returnfalse. - If
LoginStrategyis not empty, then setLoginStrategy.PhoneNumberLoginwith boolean valuetrue(Turn on) orfalse(Turn off). - Call
callCloudApiwith parameter toupdate Login Strategy:
{
"params":{
"EnvId": `env`,
...LoginStrategy
},
"service":"lowcode",
"action":"ModifyLoginStrategy"
}
- Return result.
Scenario 5: Sms Login config
- Call
callCloudApiwith parameter to get Login Strategy and save theresult.DataasLoginStrategy:
{
"params":{
"EnvId": `env`
},
"service":"lowcode",
"action":"DescribeLoginStrategy"
}
- If
LoginStrategyis empty, then returnfalse. - If
LoginStrategyis not empty, then setLoginStrategy.SmsVerificationConfig. - Call
callCloudApiwith parameter toupdate Login Strategy:
{
"params":{
"EnvId": `env`,
...LoginStrategy
},
"service":"lowcode",
"action":"ModifyLoginStrategy"
}
- Return result.
Scenario 6: Email Login turn on/off
- Call
callCloudApiwith parameter toupdate Login Strategy:
{
"params":{
"EnvId": `env`,
"Id": "email",
"On": "TRUE" | "FALSE",
"EmailConfig": {
"On": "TRUE",
"SmtpConfig": {
"AccountPassword": "",
"AccountUsername": "",
"SecurityMode": "",
"SenderAddress": "",
"ServerHost": "",
"ServerPort": "",
}
}
},
"service":"tcb",
"action":"ModifyProvider"
}
- Return result.
Scenario 7: Email Login config
- EmailConfig interface
interface IEmailConfig {
On: 'TRUE' | 'FALSE'; // 是否开启邮件代发
// 如果开启邮件代发,则以下字段为空字符串
SmtpConfig: {
AccountPassword: string; // SMTP 账号密码
AccountUsername: string; // SMTP 账号
SecurityMode: string; /// SMTP 安全模式
SenderAddress: string; // 发件人地址
ServerHost: string; // SMTP 服务器主机, QQ邮箱为"smtp.qq.com",腾讯企业邮箱为"smtp.exmail.qq.com"
ServerPort: string; // SMTP 服务器端口,QQ邮箱和腾讯企业邮箱为 465
}
}
- Call
callCloudApiwith parameter toupdate Login Strategy, ifEmailConfig.OnisTRUE, then setEmailConfig.SmtpConfigwith empty object, ohterwiseEmailConfig.OnisFALSE, then ask the user to provideEmailConfig.SmtpConfig
{
"params":{
"EnvId": `env`,
"Id": "email",
"EmailConfig": IEmailConfig
},
"service":"tcb",
"action":"ModifyProvider"
}
- Return result.
Scenario 8: WeChat Open Platform Login turn on/off
- Call
callCloudApiwith parameter to get all provider config then filter byIdiswx_open, and result save asWeChatProvider:
{
"params":{
"EnvId": `env`,
},
"service":"tcb",
"action":"GetProviders"
}
- Let user to visit
WeChat Open Platform(https://open.weixin.qq.com/cgi-bin/readtemplate?t=regist/regist_tmpl) getAppIDandAppSecret, then callcallCloudApiwith parameter to update WeChatProvider
{
"params":{
"EnvId": `env`,
"Id": "wx_open",
"On": "TRUE" | "FALSE",
"Config": {
...WeChatProvider.Config,
ClientId: `AppID`,
ClientSecret: `AppSecret`,
}
},
"service":"tcb",
"action":"ModifyProvider"
}
- Return result.
Scenario 9: Google Login turn on/off
- Call
callCloudApiwith parameter to get auth domain and saveresult.Data.StaticDomainasstaticDomain:
{
"params":{
"EnvId": `env`,
},
"service":"lowcode",
"action":"DescribeStaticDomain"
}
- Let user to visit
Google Cloud OAuth 2.0(https://console.cloud.google.com/apis/credentials) getClient IDandClient Secret, and set "https://staticDomain/__auth/" toAuthorized redirect URI, then callcallCloudApiwith parameter to update
{
params: {
EnvId: `env`,
ProviderType: 'OAUTH',
Id: 'google',
Name: {
Message: 'Google',
},
Description: {
Message: '',
},
Config: {
EnvId: `env`,
ClientId: `Client ID`,
ClientSecret: `Client Secret`,
Issuer: '',
JwksUri: '',
RedirectUri: '',
Scope: 'email openid profile',
AuthorizationEndpoint: 'https://accounts.google.com/o/oauth2/v2/auth',
TokenEndpoint: 'https://oauth2.googleapis.com/token',
UserinfoEndpoint: 'https://www.googleapis.com/oauth2/v3/userinfo',
RevocationEndpoint: '',
ResponseType: '',
SignoutEndpoint: '',
TokenEndpointAuthMethod: 'CLIENT_SECRET_BASIC',
SamlMetadata: '',
RequestParametersMap: {
RegisterUserSyncScope: 'syncEveryLogin',
RegisterUserType: 'externalUser',
IsGoogle: 'TRUE',
},
ResponseParametersMap: {
Name: '',
PhoneNumber: '',
Sub: '',
Username: '',
},
ProfileMetaMap: [],
Proxy: '',
UserinfoByAuthorizationCode: false,
AuthorizationUserAgentMap: {},
DisableProviderSub: false,
StorageDb: '',
},
Picture: 'https://qcloudimg.tencent-cloud.cn/raw/f9131c00dcbcbccd5899a449d68da3ba.png',
TransparentMode: 'FALSE',
ReuseUserId: 'TRUE',
AutoSignUpWithProviderUser: 'TRUE',
},
service: 'tcb',
action: 'ModifyProvider',
}
- Return result.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?