Pds: invite codes are only presence-checked — no store, validation, single-use semantics, or admin endpoints #36
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
performance
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET#36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
With
PdsOptions.OpenRegistration = false,PdsService.CreateAccountAsynconly checks that the invite code is non-empty (PdsService.cs:52-53) — any string passes:So "invite codes are required" is not actually enforceable with the package alone. There is no storage, validation, consumption (single-use semantics), or admin surface for codes.
While building Updraft's PDS container I had to implement all of this app-side:
InviteCodestable + service with atomic claim/confirm/release (single-UPDATE claim so concurrent signups can't double-spend a code)POST /xrpc/com.atproto.server.createAccount(because the SDK's mapped endpoint would accept any non-empty string)com.atproto.server.createInviteCode,com.atproto.admin.getInviteCodes,com.atproto.admin.disableInviteCodeswith Basic admin authSuggestion: an
IInviteCodeStoreabstraction (with an in-memory default) thatCreateAccountAsyncconsults + consumes whenOpenRegistration == false, plus optional mapping of the standard invite admin XRPC endpoints (they exist in the com.atproto lexicons) guarded by a configurable admin credential. Happy to share our implementation as a starting point: https://git.grandiras.net/Grandiras/Updraft (src/Updraft.Pds).