Repository navigation
Beta invite codes: 3 per new account, admin generation, console Invites + Admin - #44
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Owner: "Console should have admin page for inviting via invite code. Each invited user should get 3 invites to share for beta. Admins should be able to generate codes." Contract: spec §6.5.1.
OUTER-XXXX-XXXX(40 bits, OS CSPRNG, Crockford; input normalizes case, dashes, prefix, O→0, I/L→1). Single-use,invite_codetable (migration0002, append-only after the reset).OUTER_ADMIN_EMAILS) get none and generate instead.sign_in(MCP), the OAuth sign-in page and the console sign-in take an optional invite code. A closed-beta email gets an email code only with a valid invite; the invite rides theverificationrow and is consumed when the email code is verified, in the transaction that creates the user (conditional UPDATE; a lost race creates nothing: "That invite code was just used."). An unverified email can't spend a code; invalid/used/revoked codes all get the same closed-beta answer (no oracle).?t=invites(your codes, copy, status, who joined) and?t=admin(generate 1–50 with a note, all codes with creator/redeemer, revoke unused, waitlist), from the rail account menu. Admin APIs are 403 for non-admins.Checks: 458 tests (grant counts, round trip, bad/used/revoked codes, double spend, allowlisted ignores the code, 403s, revoke rules, normalization). Security review (subagent): no bypass, race-safe, no enumeration oracle, admin checks server-side on every route, no XSS; one low note (an operator config change between send and verify still admits an allowlisted email) — accepted. Live (
outer:e187767): admin and invites pages at 1440 and 390 px, no overflow, no console errors; generated 3 real codes through the page; an unknown email with a bogus code gets the closed-beta answer.CodeRabbit is out of free reviews; merging on green CI plus the checks above.