feat(auth): self-service signup — router mints per-PM API keys#2
Merged
mrdulasolutions merged 2 commits intomainfrom Apr 20, 2026
Merged
feat(auth): self-service signup — router mints per-PM API keys#2mrdulasolutions merged 2 commits intomainfrom
mrdulasolutions merged 2 commits intomainfrom
Conversation
Adds the onboarding piece the v2 architecture was missing: PMs now go
from nothing to a working Claude Code connection without ever touching
the CRM admin UI.
router/signup.py — two endpoints on the public router:
GET /signup → minimal dark-themed HTML page (name/email/password/token)
POST /signup → orchestrates the signup dance:
1. validate REVA_SIGNUP_TOKEN (constant-time)
2. POST nakatomi/auth/signup (creates user)
3. POST nakatomi/workspace/members with admin token
(adds user to the Rev A workspace)
4. POST nakatomi/workspace/api-keys with admin token
(mints a per-user nk_... key)
5. return {api_key, user_id, workspace_slug, mcp_url}
plugin/install.sh — interactive wizard when REVA_MCP_URL is set but
REVA_API_KEY is not. Reads name/email/password/token from stdin, POSTs
via a stdlib urllib.request (no curl/jq dependency), captures the key,
and saves it to both ~/.reva-turbo/config.yaml and ~/.claude/mcp.json.
railway/template.yaml — new shared vars REVA_SIGNUP_TOKEN and
NAKATOMI_ADMIN_TOKEN. Signup stays disabled (503) until both are set.
docs/AUTH.md — full principal matrix, flow diagrams, rotation story,
known gaps (no email verify yet, no SSO).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
install.sh, setup, bin/, and skills/ all moved under plugin/ in the v2
restructure — but the CI workflow still referenced the old root paths
and failed with "bash: install.sh: No such file or directory" on both
ubuntu and macos runners.
- install-matrix: bash install.sh -> bash plugin/install.sh (both steps)
- lint-shell: shellcheck paths re-rooted to plugin/
REVA_TURBO_DIR still points at \${{ github.workspace }}; install.sh's
find_plugin_root() detects the plugin/ subdir automatically.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the onboarding piece the v2 architecture was missing: PMs now go from nothing to a working Claude Code connection without ever touching the CRM admin UI.
router/signup.py — two endpoints on the public router:
GET /signup → minimal dark-themed HTML page (name/email/password/token)
POST /signup → orchestrates the signup dance:
1. validate REVA_SIGNUP_TOKEN (constant-time)
2. POST nakatomi/auth/signup (creates user)
3. POST nakatomi/workspace/members with admin token
(adds user to the Rev A workspace)
4. POST nakatomi/workspace/api-keys with admin token
(mints a per-user nk_... key)
5. return {api_key, user_id, workspace_slug, mcp_url}
plugin/install.sh — interactive wizard when REVA_MCP_URL is set but REVA_API_KEY is not. Reads name/email/password/token from stdin, POSTs via a stdlib urllib.request (no curl/jq dependency), captures the key, and saves it to both ~/.reva-turbo/config.yaml and ~/.claude/mcp.json.
railway/template.yaml — new shared vars REVA_SIGNUP_TOKEN and NAKATOMI_ADMIN_TOKEN. Signup stays disabled (503) until both are set.
docs/AUTH.md — full principal matrix, flow diagrams, rotation story, known gaps (no email verify yet, no SSO).