Help us improve
Share bugs, ideas, or general feedback.
From cloudbase
Inspects, enables, disables, and configures CloudBase auth providers, login methods, publishable keys, and SMS/email sender setup before implementing client or backend auth flows.
npx claudepluginhub tencentcloudbase/cloudbase-mcp --plugin cloudbaseHow this skill is triggered — by the user, by Claude, or both
Slash command
/cloudbase:auth-toolThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
If this environment only installed the current skill, start from the CloudBase main entry and use the published `cloudbase/references/...` paths for sibling skills.
Provides CloudBase Web auth frontend integration guidance: login, registration, sessions, protected routes using @cloudbase/js-sdk. Read after auth-tool provider checks.
References Auth0 CLI commands for managing apps, APIs, users, roles, organizations, actions, logs, custom domains, universal login, and Terraform exports. Helps with authentication, RBAC, branding, debugging, and scripting via --json output.
Routes to WorkOS references for implementing, debugging authentication like SSO, SAML, MFA, RBAC, Directory Sync, and SDKs across Next.js, React, Node.js, Python, PHP.
Share bugs, ideas, or general feedback.
If this environment only installed the current skill, start from the CloudBase main entry and use the published cloudbase/references/... paths for sibling skills.
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.mdhttps://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/auth-tool/SKILL.mdKeep local references/... paths for files that ship with the current skill directory. When this file points to a sibling skill such as auth-tool or web-development, use the standalone fallback URL shown next to that reference.
auth-web.../auth-web/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/auth-web/SKILL.md)../auth-wechat/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/auth-wechat/SKILL.md)../auth-nodejs/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/auth-nodejs/SKILL.md)../http-api/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/http-api/SKILL.md)cloudbase-platform/references/protocols/change-safety-protocol.md).Configure CloudBase authentication providers: Anonymous, Username/Password, SMS, Email, WeChat, Google, and more.
Prerequisites: CloudBase environment ID (env)
Keep these two auth domains separate:
auth: MCP / management-side login only. Use it for status, start_auth, set_env, logout, and get_temp_credentials.queryAppAuth / manageAppAuth: app-side authentication configuration. Use them for login methods, provider settings, publishable key, static domain, client config, and custom login keys.Preferred execution order for this skill:
queryAppAuth / manageAppAuth first when the needed action exists there.callCloudApi only as a fallback or for debugging raw request shapes.auth tool.Preferred MCP tool path: queryAppAuth(action="getLoginConfig")
Recommended MCP request:
{
"action": "getLoginConfig"
}
queryAppAuth uses the currently selected environment and returns a short result by default:
{
"success": true,
"envId": "your-full-env-id",
"loginMethods": {
"usernamePassword": true,
"email": true,
"anonymous": false,
"phone": false
}
}
Fallback API path: use the official login-config API. Do not use lowcode/DescribeLoginStrategy or lowcode/ModifyLoginStrategy as the default path.
Query current login configuration:
{
"params": { "EnvId": `env` },
"service": "tcb",
"action": "DescribeLoginConfig"
}
The underlying login strategy contains fields such as:
AnonymousLoginUserNameLoginPhoneNumberLoginEmailLoginSmsVerificationConfigMfaConfigPwdUpdateStrategyParameter mapping for downstream Web auth code:
queryAppAuth(action="getLoginConfig") and manageAppAuth(action="patchLoginStrategy") return sdkStyle: "supabase-like" plus sdkHints; treat that as the preferred frontend-auth calling guidePhoneNumberLogin controls phone OTP flows used by auth-web auth.signInWithOtp({ phone }) and auth.signUp({ phone })EmailLogin controls email OTP flows used by auth-web auth.signInWithOtp({ email }) and auth.signUp({ email })UserNameLogin controls username/password Web auth flows used by auth-web auth.signUp({ username, password }) and auth.signInWithPassword({ username, password })signInWithEmailAndPasswordUserNameLogin also enables the broader password-login surface exposed by auth.signInWithPassword({ username|email|phone, password })SmsVerificationConfig.Type = "apis" requires both Name and MethodEnvId is always the CloudBase environment ID, not the publishable keyEnvId first before generating auth config, SDK init examples, or console linksInternal behavior of manageAppAuth(action="patchLoginStrategy"):
patch into the writable strategy fieldsloginMethods result⚠️ Anonymous login is disabled by default for new environments. Inactive existing environments (no anonymous login usage within the past month) have also been automatically disabled. Additionally, anonymous users are denied AI model invocation permissions by default. Only enable anonymous login when the application explicitly requires unauthenticated access and you accept the associated security trade-offs.
Preferred MCP tool path: manageAppAuth(action="patchLoginStrategy")
To explicitly enable anonymous login (only when required):
{
"action": "patchLoginStrategy",
"patch": {
"anonymous": true
}
}
The tool handles read-merge-write internally. The model does not need to build a full ModifyLoginConfig payload.
Important: Even after enabling anonymous login, anonymous users cannot call AI models by default. This permission must be explicitly granted separately if needed.
Preferred MCP tool path: manageAppAuth(action="patchLoginStrategy")
Recommended MCP request:
{
"action": "patchLoginStrategy",
"patch": {
"usernamePassword": true
}
}
The tool handles read-merge-write internally. The model does not need to build a full ModifyLoginConfig payload.
Preferred MCP tool path: manageAppAuth(action="patchLoginStrategy")
Use patch.phone = true/false for the login method itself.
If SMS provider behavior also needs to change, keep using provider-side or raw API configuration for the extra fields such as SmsVerificationConfig.
Short MCP example:
{
"action": "patchLoginStrategy",
"patch": {
"phone": true
}
}
Email has two layers of configuration:
ModifyLoginConfig.EmailLogin: controls whether email/password login is enabledModifyProvider(Id="email"): controls the email sender channel and SMTP configurationauth.signInWithOtp({ email }) and auth.signUp({ email })Preferred MCP tool path:
manageAppAuth(action="patchLoginStrategy") for EmailLoginmanageAppAuth(action="updateProvider") for provider settingsShort MCP example:
{
"action": "patchLoginStrategy",
"patch": {
"email": true
}
}
Configure email provider (Tencent Cloud email):
{
"params": {
"EnvId": `env`,
"Id": "email",
"On": "TRUE",
"EmailConfig": { "On": "TRUE", "SmtpConfig": {} }
},
"service": "tcb",
"action": "ModifyProvider"
}
Disable email provider:
{
"params": { "EnvId": `env`, "Id": "email", "On": "FALSE" },
"service": "tcb",
"action": "ModifyProvider"
}
Configure email provider (custom SMTP):
{
"params": {
"EnvId": `env`,
"Id": "email",
"On": "TRUE",
"EmailConfig": {
"On": "FALSE",
"SmtpConfig": {
"AccountPassword": "password",
"AccountUsername": "username",
"SecurityMode": "SSL",
"SenderAddress": "sender@example.com",
"ServerHost": "smtp.qq.com",
"ServerPort": 465
}
}
},
"service": "tcb",
"action": "ModifyProvider"
}
Preferred MCP tool path:
queryAppAuth(action="listProviders") or queryAppAuth(action="getProvider")manageAppAuth(action="updateProvider"){
"params": { "EnvId": `env` },
"service": "tcb",
"action": "GetProviders"
}
Filter by Id == "wx_open", save as WeChatProvider.
Get credentials from WeChat Open Platform:
AppIDAppSecretUpdate:
{
"params": {
"EnvId": `env`,
"Id": "wx_open",
"On": "TRUE", // "FALSE" to disable
"Config": {
...WeChatProvider.Config,
ClientId: `AppID`,
ClientSecret: `AppSecret`
}
},
"service": "tcb",
"action": "ModifyProvider"
}
Preferred MCP tool path:
queryAppAuth(action="getStaticDomain")queryAppAuth(action="listProviders") or queryAppAuth(action="getProvider")manageAppAuth(action="updateProvider"){
"params": { "EnvId": `env` },
"service": "tcb",
"action": "DescribeStaticStore"
}
Prefer MCP: queryAppAuth(action="getStaticDomain") — use cdnDomain / staticDomain from the tool response (first store’s CdnDomain). Raw rows are in staticStores.
Configure at Google Cloud Console:
https://{staticDomain}/__auth/Client ID and Client SecretEnable:
{
"params": {
"EnvId": `env`,
"ProviderType": "OAUTH",
"Id": "google",
"On": "TRUE", // "FALSE" to disable
"Name": { "Message": "Google" },
"Description": { "Message": "" },
"Config": {
"ClientId": `Client ID`,
"ClientSecret": `Client Secret`,
"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",
"TokenEndpointAuthMethod": "CLIENT_SECRET_BASIC",
"RequestParametersMap": {
"RegisterUserSyncScope": "syncEveryLogin",
"IsGoogle": "TRUE"
}
},
"Picture": "https://qcloudimg.tencent-cloud.cn/raw/f9131c00dcbcbccd5899a449d68da3ba.png",
"TransparentMode": "FALSE",
"ReuseUserId": "TRUE",
"AutoSignUpWithProviderUser": "TRUE"
},
"service": "tcb",
"action": "ModifyProvider"
}
Use provider lifecycle APIs when the identity source itself needs to be created, updated, or removed.
Preferred MCP tool path:
queryAppAuth(action="listProviders")queryAppAuth(action="getProvider")manageAppAuth(action="addProvider")manageAppAuth(action="updateProvider")manageAppAuth(action="deleteProvider")Guidance:
addProvider when the provider record does not exist yet and you need to create it with providerType, optional providerId, displayName, and config.updateProvider when the provider already exists and only its configuration or enablement state needs to change.deleteProvider when the provider must be removed entirely instead of only disabling it.Use client APIs for client metadata and token/session settings. Do not use them as a replacement for login strategy or provider management.
Preferred MCP tool path:
queryAppAuth(action="getClientConfig")manageAppAuth(action="updateClientConfig")Both tools should default to the current selected environment's default client. Only pass clientId when you intentionally want to inspect or modify a non-default client record.
Query client config:
{
"params": { "EnvId": `env`, "Id": `env` },
"service": "tcb",
"action": "DescribeClient"
}
Update client config:
{
"params": {
"EnvId": `env`,
"Id": `env`,
"AccessTokenExpiresIn": 7200,
"RefreshTokenExpiresIn": 2592000,
"MaxDevice": 3
},
"service": "tcb",
"action": "ModifyClient"
}
Preferred MCP tool path:
queryAppAuth(action="getPublishableKey")manageAppAuth(action="ensurePublishableKey")queryAppAuth(action="listApiKeys")manageAppAuth(action="createApiKey")manageAppAuth(action="deleteApiKey")Use the shortcut pair getPublishableKey / ensurePublishableKey for the most common frontend-readiness flow.
Use the generic API key lifecycle actions when you need inventory, pagination, non-publishable keys, or explicit deletion.
Query existing publishable key:
{
"params": { "EnvId": `env`, "KeyType": "publish_key", "PageNumber": 1, "PageSize": 10 },
"service": "tcb",
"action": "DescribeApiKeyList"
}
queryAppAuth(action="getPublishableKey") should always force KeyType="publish_key" and return a short payload with publishableKey, keyId, keyName, expireAt, and createdAt.
List API keys:
{
"action": "listApiKeys",
"keyType": "api_key",
"pageNumber": 1,
"pageSize": 20
}
Use listApiKeys for a general key inventory view. It supports optional keyType, pageNumber, and pageSize.
Ensure publishable key exists:
{
"params": { "EnvId": `env`, "KeyType": "publish_key" },
"service": "tcb",
"action": "CreateApiKey"
}
manageAppAuth(action="ensurePublishableKey") should first query the existing publish_key; if one already exists, return it directly; otherwise create it and return the new key. This keeps the MCP interface short and avoids requiring the model to reason about KeyType or whether a key already exists.
Create a generic API key:
{
"action": "createApiKey",
"keyType": "api_key",
"keyName": "server-prod",
"expireIn": 86400
}
createApiKey defaults to publish_key when keyType is omitted, but it can also create api_key for generic service-side access.
Delete an API key:
{
"action": "deleteApiKey",
"keyId": "api-key-id"
}
Use deleteApiKey only when you intentionally want to revoke that key token.
If creation fails, direct user to: "https://tcb.cloud.tencent.com/dev?envId=`env`#/env/apikey"
Preferred MCP tool path: manageAppAuth(action="createCustomLoginKeys")
Use custom login keys when the application needs CloudBase custom auth integration and the standard provider setup is not enough.