Public: anyone can read this; the crew can change it.
open-platform.sh sign-in is a linked method, not a back door: it never creates an account outside the signup rules #2581
The open-platform.sh (edge) sign-in is now a method a person links to an account they already have. An unlinked edge login is nobody and creates nothing. I did not finish a full bun test run (it ran past what I could wait for).
stopped parked by the crew deploy 72e8796
2 earlier comments
The open-platform.sh (edge) sign-in is now a method a person links to an account they already have. An unlinked edge login is nobody and creates nothing. I did not finish a full bun test run (it ran past what I could wait for). I ran tsc and the suites covering this change, and all pass; the forge's check runs the rest on this push.
What changed
- Auth: the edge's login reaches an account only through a new
linked_logintable (core/linked_login.ts).ensureEdgeUserand theedgeaccount origin are gone, so the edge can't create an account. It also no longer matches an account by username, so a platform name can't take over a forge account of the same name. - Where an unlinked person goes: they see the forge's own
/signinand/signup, with a note to link the platform in Settings afterwards. The existingsignupmode, human check, email verification, quotas and zero budget apply there unchanged. - Link and unlink: Settings → Linked sign-in (
/settings/linked,web/pages/linked.ts) takes a signed-in browser that the edge also vouches for on the same request. These POSTs are same-origin checked.- A login can belong to one account only.
- Unlinking is refused when it would be the account's only way in (no password and no passkey).
- Existing edge accounts: a migration links every account the edge made before this (found from its
user.createdevent withvia: edge) to the login it was made for. The owner's Accounts list now showslinked: open-platform.shon each. - Turning it off:
FORGE_LINKED_METHODS(unset means all on,nonemeans off) drops the edge token at boot, so the headers are ignored and no edge UI is shown. The README says so. The forge works with it off, and a test covers that. - Tests:
test/linked-signin.test.tscovers- an unknown edge sign-in creating nothing;
- the same sign-in refused while
signupis closed; - link, then sign in reaching the same account;
- a cross-site link attempt;
- a login already linked elsewhere;
- unlink;
- the last-way-in guard;
- the backfill and listing;
- the edge turned off.
- Tests I changed or removed: the tests that asserted the edge makes an account on sight were wrong under the new rule. I removed or rewrote them in
signup,signup-closed,no-signup-admin,reserved-names,verify-email,accountsandedge-auth.
Left out
- Linking through the full authorization server, which follows #666.
- An audit event for link and unlink.
- A per-method setting. There is one method today, so
FORGE_LINKED_METHODSis a list of one. - Existing edge accounts with no password and no passkey can't unlink. That is deliberate.
Try it
Set FORGE_EDGE_TOKEN, sign in with a password or passkey, and open /settings/linked while the edge is vouching for you. Then bun test test/linked-signin.test.ts test/edge-auth.test.ts.
🤖 Generated with Claude Code
I merged main into the branch and pushed it. The merge had one conflict, in src/web/chrome.ts, and it was only the imports. I kept both sides: main's audienceFacts/audienceOf import and this branch's edgeDoor.
tsc is clean. The suites that cover this change pass: linked-signin, edge-auth, signup-closed and accounts. I did not run the full suite, so the forge's check on this push is the full run.
The pull is otherwise unchanged:
- Edge sign-in: it reaches only an account a person has linked, and it never creates one.
- Linking: people link and unlink at Settings → Linked sign-in.
- Existing edge accounts: a migration links them, so they keep working.
- Turning it off:
FORGE_LINKED_METHODS=noneturns the edge method off.
Parked by the crew: the check stayed red through 2 automatic tries
The open-platform.sh (edge) sign-in is now a method a person links to an account they already have. An unlinked edge login is nobody and creates nothing. I did not finish a full
bun testrun (it ran past what I could wait for). I rantscand the suites covering this change, and all pass; the forge's check runs the rest on this push.What changed
linked_logintable (core/linked_login.ts).ensureEdgeUserand theedgeaccount origin are gone, so the edge can't create an account. It also no longer matches an account by username, so a platform name can't take over a forge account of the same name./signinand/signup, with a note to link the platform in Settings afterwards. The existingsignupmode, human check, email verification, quotas and zero budget apply there unchanged./settings/linked,web/pages/linked.ts) takes a signed-in browser that the edge also vouches for on the same request. These POSTs are same-origin checked.user.createdevent withvia: edge) to the login it was made for. The owner's Accounts list now showslinked: open-platform.shon each.FORGE_LINKED_METHODS(unset means all on,nonemeans off) drops the edge token at boot, so the headers are ignored and no edge UI is shown. The README says so. The forge works with it off, and a test covers that.test/linked-signin.test.tscoverssignupis closed;signup,signup-closed,no-signup-admin,reserved-names,verify-email,accountsandedge-auth.Left out
FORGE_LINKED_METHODSis a list of one.Try it Set
FORGE_EDGE_TOKEN, sign in with a password or passkey, and open/settings/linkedwhile the edge is vouching for you. Thenbun test test/linked-signin.test.ts test/edge-auth.test.ts.🤖 Generated with Claude Code
Closes #668