catalyst-authentication

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

How It Works

工作原理

  1. Identify flow type — Hosted login (redirect to Catalyst login page), embedded login (custom UI), or backend
    getCurrentUser
    check.
  2. Load
    references/auth-basics.md
    — for signup/login flows, ZAID gotcha, hosted vs embedded login, and common auth errors.
  3. ZAID warning — ZAID differs between Development and Production. This is the #1 auth issue in production. Always verify the environment.
  4. Security Rules — If the query involves controlling who can invoke a function, route to
    catalyst-functions
    skill and its
    references/functions-basics.md
    Security Rules section. Security Rules has two parameters: (a)
    methods
    — which HTTP methods (GET/POST/PUT/DELETE/PATCH) are enabled for the function (removing a method blocks that verb entirely), and (b)
    authentication
    — a single binary flag (
    optional
    = public,
    required
    = authenticated users only) applied function-wide, not per-method. For role-based data access control, route to DataStore Scopes and Permissions (Console → Table → Scopes and Permissions).
  5. OAuth / Connections — Load
    references/connections.md
    for external API OAuth token management (Zoho or third-party).
  1. 识别流程类型 —— 托管登录(重定向至 Catalyst 登录页面)、嵌入式登录(自定义UI)或后端
    getCurrentUser
    校验。
  2. 加载
    references/auth-basics.md
    —— 用于了解注册/登录流程、ZAID 注意事项、托管与嵌入式登录对比,以及常见认证错误。
  3. ZAID 警告 —— ZAID 在开发环境和生产环境中是不同的。这是生产环境中排名第一的认证问题。请始终验证环境信息。
  4. 安全规则 —— 如果查询涉及控制谁可以调用函数,请跳转至
    catalyst-functions
    技能及其
    references/functions-basics.md
    中的安全规则章节。安全规则包含两个参数:(a)
    methods
    —— 函数启用的 HTTP 方法(GET/POST/PUT/DELETE/PATCH)(移除某一方法将完全阻止该请求方式),以及 (b)
    authentication
    —— 一个全局二进制标志(
    optional
    = 公开访问,
    required
    = 仅允许已认证用户访问),该标志作用于整个函数,而非单个方法。如需基于角色的数据访问控制,请跳转至 DataStore 范围与权限(控制台 → 表格 → 范围与权限)。
  5. OAuth / Connections —— 加载
    references/connections.md
    以了解外部 API 的 OAuth 令牌管理(Zoho 或第三方服务)。

Security Checklist

安全检查清单

  • ZAID is environment-specific. The Development ZAID is different from the Production ZAID. Social logins (Google, Facebook, LinkedIn, Microsoft) configured in Development MUST be reconfigured with the Production ZAID and production app domain before going live — using the wrong ZAID causes all social logins to silently fail in production.
  • DataStore permissions are separate from function-level auth. Requiring authentication in Security Rules only controls who can call the function. App User table permissions (Console → Table → Scopes and Permissions) separately control which DataStore operations authenticated users can perform.
  • ZAID 是环境专属的。开发环境的 ZAID 与生产环境的 ZAID 不同。在开发环境中配置的社交登录(Google、Facebook、LinkedIn、Microsoft)必须在上线前使用生产环境的 ZAID 和生产应用域名重新配置 —— 使用错误的 ZAID 会导致生产环境中所有社交登录静默失败。
  • DataStore 权限与函数级认证相互独立。安全规则中要求认证仅控制谁可以调用函数。应用用户表权限(控制台 → 表格 → 范围与权限)单独控制已认证用户可以执行哪些 DataStore 操作。

Triggers

触发场景

Use this skill for: "authentication", "user management", "login", "signup",
getCurrentUser
, "ZAID",
registerUser
,
isUserAuthenticated
,
signOut
, "hosted login", "embedded login", "Connections", "OAuth token",
getConnector
,
getAccessToken
, "Security Rules", "App User", "credentials include", or "auth redirect".
当涉及以下内容时使用此技能:"authentication"、"user management"、"login"、"signup"、
getCurrentUser
、"ZAID"、
registerUser
isUserAuthenticated
signOut
、"hosted login"、"embedded login"、"Connections"、"OAuth token"、
getConnector
getAccessToken
、"Security Rules"、"App User"、"credentials include" 或 "auth redirect"。

References

参考资料

ReferenceLoad when the query is about…
references/auth-basics.md
User signup/login, getCurrentUser, Web SDK auth flows, ZAID gotcha, hosted vs embedded login, common auth errors
catalyst-functions
skill
Security Rules — function invocation control (
methods
,
authentication: optional/required
)
references/connections.md
OAuth token management for external APIs — getConnector, getAccessToken, Zoho and third-party service connections
参考资料适用查询场景…
references/auth-basics.md
用户注册/登录、getCurrentUser、Web SDK 认证流程、ZAID 注意事项、托管与嵌入式登录对比、常见认证错误
catalyst-functions
技能
安全规则 —— 函数调用控制(
methods
authentication: optional/required
references/connections.md
外部 API 的 OAuth 令牌管理 —— getConnector、getAccessToken、Zoho 及第三方服务连接