Skip to content

Auth & access

Registration, login, access codes and the waitlist.

Every schema below is exported from @novaterra/contracts and validated on both sides of the wire. Source: packages/contracts/src/auth.ts.

RegisterRequest

FieldTypeNotes
emailstring (email)
passwordstring (min 8)
handlestring (min 2, max 32, regex)
displayNamestring (min 1, max 80)
accessCodestring (min 4)

LoginRequest

FieldTypeNotes
emailstring (email)
passwordstring

AuthResponse

FieldTypeNotes
beingBeing
isOwnerboolean

AccessCode

FieldTypeNotes
codestring
createdById
usedById | null
notestringoptional · default ''
createdAtISODate
usedAtISODate | null

WaitlistRequest

FieldTypeNotes
emailstring (email)
namestring (max 80)optional
whystring (max 500)optional

EmailStatus

What the signed-in person’s own address looks like from here. emailConfigured is deliberately part of the response rather than something the UI guesses: a node with no RESEND_API_KEY cannot send anything, and a button offering to “send a link” that silently goes nowhere is worse than no button. It is a capability flag, not a secret — it says whether this node has a mail provider, not who it is or what its key is.

FieldTypeNotes
emailstring (email)
verifiedboolean
verifiedAtISODate | null
pendingboolean
emailConfiguredboolean

VerifyEmailRequest

FieldTypeNotes
tokenstring (min 16, max 256)

PasswordResetRequest

“Send me a way back in.” Answered identically whether or not the address is known here.

FieldTypeNotes
emailstring (email)

SetPasswordRequest

The other half: the token from the link, and the password to put in its place.

FieldTypeNotes
tokenstring (min 16, max 256)
passwordstring (min 8)

InviteEmailRequest

Owner only: mint a code and send it to an address, rather than reading it off a screen.

FieldTypeNotes
emailstring (email)
notestring (max 200)optional · default ''

InviteEmail

One invitation, as the owner’s own screen shows it back. codeHint is a MASK (NOVA-••••-7F3K), not the code. An access code is a single-use bearer credential: whoever reads it can claim a place in this world, and this list is the one screen that will hold dozens of them at once. Settings once printed 27 live codes in plaintext and that was the finding; a list whose job is “who did I invite, and did they arrive” does not need to carry the credential to do it. The owner who needs the literal code still has GET /api/auth/codes.

FieldTypeNotes
idId
emailstring (email)
codeHintstring
notestringoptional · default ''
sentById
deliveredboolean
reasonstringoptional · default ''
usedboolean
createdAtISODate