Skip to content

[Epic] Universal org invite link — shareable self-serve join (V1) #11586

Description

@os-zhuang

Ruling (maintainer, 2026-08-24, chat — quoted verbatim)

「我想要的是一个统一的邀请链接,发到群里,个人自己注册登录,而不需要我输入邮箱。」
「可以,你开一个epic任务,用objectstack项目经理技能统一派发处理」

The maintainer approved the V1 shape proposed in that conversation (four-axis analysis summarized below). This parent is the epic's coordination node — it is never dispatched; work happens on the sub-issues.

Outcome

An org owner/admin mints ONE shareable join link, posts it to a group chat; anyone opening it registers/logs in and becomes a member of that org. The admin never types an email address.

Verified premises (2026-08-24)

V1 scope (ruled)

  • One active link per org; role pinned to member (a link NEVER grants admin/owner); default expiry 7 days; revocable/rotatable; optional max-uses.
  • Membership writes go through the governed better-auth member path (server-side addMember) — never hand-inserted sys_member rows.
  • Non-goals V1 (enterprise later): domain allowlists, approval queues, per-link roles, multiple concurrent links.

Four-axis decision record (中文,按 2026-08-20 裁定)

  • 实际业务需求:「链接发群里」是团队拉人的主流方式;逐个录邮箱+邮件送达率是双重摩擦;维护者本人即第一个撞上该需求的用户;受邀者注册即获客(增长原语)。
  • 长远合理性:标准 IdP 能力(Slack/Notion/飞书同款);better-auth 不原生支持,自建但贴着既有治理面(成员写入走 addMember 同族路径;策略面与 enterprise organizations 的 membership_policy 对齐)。
  • 防错/安全:链接=不记名凭证,V1 必带四件套(过期/可撤销旋转/角色钉死 member/次数上限可选);邮箱验证姿态显式设计(prod 开验证);OS_ORG_LIMIT 只数 owner,成员加入不撞组织上限。
  • 创业阶段不扩散:V1 收窄(单链接/固定角色/不做域名限制与审批队列),高杠杆增长原语而非投机面。

Sub-issues (contract-first: backend first, downstream Blocked-by)

  • A — objectstack: sys_join_link object + create/rotate/revoke/info/join endpoints (Clause-② YES: widens the public API surface ⇒ contract-tier dispatch)
  • B — objectui: console UI (link dialog on the org Team surface + /join/:token landing route) — Blocked-by A
  • C — cloud: control-plane org-scoping (org-scope plugin + PROXY_POLICY for the new object), plan-gate verification, staging E2E — Blocked-by A

Epic PM & territory

Epic PM session: session_71836b57-5db6-459d-ae4d-c6d9d7dd2cc6 (maintainer direct-dispatch; this session also dispatches the spec-adjacent sub-issue under the same instruction — deviation from the default spec-seat transfer is recorded here with the ruling quote above).
Territory: objectstack packages/plugins/plugin-auth/**, packages/platform-objects/src/identity/**, packages/spec/src/kernel/public-auth-features.ts; objectui packages/app-shell/src/console/** (org surfaces + join route); cloud packages/service-cloud/** (org-scope plugin / proxy policy).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions