Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

auth-tool-cloudbase

БесплатноБез исполняемых скриптовНе проверен

First-step CloudBase auth provider setup skill for login and registration flows. Use it before auth-web to configure and manage authentication providers for…

bighardpersonот bighardperson★ 71 звезда на GitHub

Об этом скилле

Activation Contract

Use this first when

  • The user mentions login, registration, authentication, provider setup, SMS, email, anonymous login, or third-party login.
  • A Web, native App, or backend flow needs CloudBase auth configuration before implementation.
  • For any CloudBase Web auth flow, activate this skill before auth-web.

Read before writing code if

  • The request includes any auth UI or auth API work. Provider status must be checked first.
  • When the task is a Web auth flow, read auth-web after this skill and before writing frontend code.

Then also read

  • Web auth UI -> ../auth-web/SKILL.md
  • Mini program auth -> ../auth-wechat/SKILL.md
  • Native App / raw HTTP -> ../http-api/SKILL.md

Do NOT use this as

  • A replacement for platform implementation rules. This skill configures providers; it does not define the full frontend or client integration path.

Common mistakes / gotchas

  • Writing login UI before enabling the required provider.
  • Implementing Web login in cloud functions.
  • Routing native App auth to Web SDK flows.

Minimal checklist

Overview

Configure CloudBase authentication providers: Anonymous, Username/Password, SMS, Email, WeChat, Google, and more.

Prerequisites: CloudBase environment ID (env)


Authentication Scenarios

1. Get Login Config

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 response contains fields such as:

  • AnonymousLogin
  • UserNameLogin
  • PhoneNumberLogin
  • EmailLogin
  • SmsVerificationConfig
  • MfaConfig
  • PwdUpdateStrategy

Parameter mapping for downstream Web auth code:

  • PhoneNumberLogin 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 password login flows used by auth-web auth.signInWithPassword({ username, password })
  • SmsVerificationConfig.Type = "apis" requires both Name and Method
  • EnvId is always the CloudBase environment ID, not the publishable key

Before calling ModifyLoginConfig, rebuild the payload from writable keys only. Do not spread the full response object back into the request.

const WritableLoginConfig = {
    "PhoneNumberLogin": LoginConfig.PhoneNumberLogin,
    "EmailLogin": LoginConfig.EmailLogin,
    "UserNameLogin": LoginConfig.UserNameLogin,
    "AnonymousLogin": LoginConfig.AnonymousLogin,
    ...(LoginConfig.SmsVerificationConfig ? { "SmsVerificationConfig": LoginConfig.SmsVerificationConfig } : {}),
    ...(LoginConfig.MfaConfig ? { "MfaConfig": LoginConfig.MfaConfig } : {}),
    ...(LoginConfig.PwdUpdateStrategy ? { "PwdUpdateStrategy": LoginConfig.PwdUpdateStrategy } : {})
}

2. Anonymous Login

  1. Get LoginConfig (see Scenario 1)
  2. Set LoginConfig.AnonymousLogin = true (on) or false (off)
  3. Update:
{
    "params": { "EnvId": `env`, ...WritableLoginConfig, "AnonymousLogin": true },
    "service": "tcb",
    "action": "ModifyLoginConfig"
}

3. Username/Password Login

  1. Get LoginConfig (see Scenario 1)
  2. Set LoginConfig.UserNameLogin = true (on) or false (off)
  3. Update:
{
    "params": { "EnvId": `env`, ...WritableLoginConfig, "UserNameLogin": true },
    "service": "tcb",
    "action": "ModifyLoginConfig"
}

4. SMS Login

  1. Get LoginConfig (see Scenario 1)
  2. Modify:
    • Turn on: LoginConfig.PhoneNumberLogin = true
    • Turn off: LoginConfig.PhoneNumberLogin = false
    • Config (optional):
      LoginConfig.SmsVerificationConfig = {
          Type: 'default',      // 'default' or 'apis'
          Name: 'method_53978f9f96a35', // required when Type = 'apis'
          Method: 'SendVerificationCode',
          SmsDayLimit: 30       // -1 = unlimited
      }
      
  3. Update:
{
    "params": {
        "EnvId": `env`,
        ...WritableLoginConfig,
        "PhoneNumberLogin": true,
        "SmsVerificationConfig": {
            "Type": "default",
            "SmsDayLimit": 30
        }
    },
    "service": "tcb",
    "action": "ModifyLoginConfig"
}

Use custom apis to send SMS:

{
    "params": {
        "EnvId": `env`,
        ...WritableLoginConfig,
        "PhoneNumberLogin": true,
        "SmsVerificationConfig": {
            "Type": "apis",
            "Name": "method_53978f9f96a35",
            "Method": "SendVerificationCode",
            "SmsDayLimit": 20
        }
    },
    "service": "tcb",
    "action": "ModifyLoginConfig"
}

5. Email Login

Email has two layers of configuration:

Полный SKILL.md на GitHub

Установить auth-tool-cloudbase в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

checklist.md

FAQ

Что делает скилл auth-tool-cloudbase?

First-step CloudBase auth provider setup skill for login and registration flows. Use it before auth-web 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 `callCloudApi`.

Как установить скилл auth-tool-cloudbase?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл auth-tool-cloudbase запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить auth-tool-cloudbase с