diff --git a/api/org_tangled/accountcompleteSignup.go b/api/org_tangled/accountcompleteSignup.go index fc4253529..43cb91b8f 100644 --- a/api/org_tangled/accountcompleteSignup.go +++ b/api/org_tangled/accountcompleteSignup.go @@ -16,11 +16,11 @@ const ( // TempAccountCompleteSignup_Input is the input argument to a org.tangled.temp.account.completeSignup call. type TempAccountCompleteSignup_Input struct { - // code: Verification code from the signup email. - Code string `json:"code" cborgen:"code"` // password: Password for the new account. Password string `json:"password" cborgen:"password"` - // username: Desired username; the assigned handle is .. + // token: Verification token from the emailed link. + Token string `json:"token" cborgen:"token"` + // username: Desired username; the handle is .. Username string `json:"username" cborgen:"username"` } diff --git a/api/org_tangled/accountresendSignup.go b/api/org_tangled/accountresendSignup.go new file mode 100644 index 000000000..299894f8a --- /dev/null +++ b/api/org_tangled/accountresendSignup.go @@ -0,0 +1,30 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package org_tangled + +// schema: org.tangled.temp.account.resendSignup + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempAccountResendSignupNSID = "org.tangled.temp.account.resendSignup" +) + +// TempAccountResendSignup_Input is the input argument to a org.tangled.temp.account.resendSignup call. +type TempAccountResendSignup_Input struct { + // email: Email address used to begin the signup. + Email string `json:"email" cborgen:"email"` +} + +// TempAccountResendSignup calls the XRPC method "org.tangled.temp.account.resendSignup". +func TempAccountResendSignup(ctx context.Context, c util.LexClient, input *TempAccountResendSignup_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.account.resendSignup", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/lexicons/temp/account/beginSignup.json b/lexicons/temp/account/beginSignup.json index 02d663de7..5dad3fbda 100644 --- a/lexicons/temp/account/beginSignup.json +++ b/lexicons/temp/account/beginSignup.json @@ -26,7 +26,8 @@ { "name": "SignupDisabled", "description": "Signup is not currently enabled on this service." }, { "name": "InvalidTurnstileToken", "description": "The Turnstile captcha response could not be verified." }, { "name": "InvalidEmail", "description": "The email address is not valid." }, - { "name": "EmailAlreadyRegistered", "description": "An account already exists for this email address." } + { "name": "EmailAlreadyRegistered", "description": "An account already exists for this email address." }, + { "name": "TooManyRequests", "description": "A signup email was sent for this address very recently; wait before asking for another." } ] } } diff --git a/lexicons/temp/account/completeSignup.json b/lexicons/temp/account/completeSignup.json index c6ea46a4c..3685491b7 100644 --- a/lexicons/temp/account/completeSignup.json +++ b/lexicons/temp/account/completeSignup.json @@ -4,24 +4,24 @@ "defs": { "main": { "type": "procedure", - "description": "Complete signup: provision the PDS account for the chosen username using the verification code from the signup email.", + "description": "Complete signup with the link token, choosing a username and password. Deliberi provisions the PDS account internally using a pre-minted invite code.", "input": { "encoding": "application/json", "schema": { "type": "object", - "required": ["username", "password", "code"], + "required": ["token", "username", "password"], "properties": { + "token": { + "type": "string", + "description": "Verification token from the emailed link." + }, "username": { "type": "string", - "description": "Desired username; the assigned handle is .." + "description": "Desired username; the handle is .." }, "password": { "type": "string", "description": "Password for the new account." - }, - "code": { - "type": "string", - "description": "Verification code from the signup email." } } } @@ -46,9 +46,9 @@ }, "errors": [ { "name": "SignupDisabled", "description": "Signup is not currently enabled on this service." }, - { "name": "InvalidUsername", "description": "Username must be 4-63 characters, lowercase letters, digits, or hyphens, and cannot start or end with a hyphen." }, - { "name": "UsernameUnavailable", "description": "This username is reserved or already taken." }, - { "name": "InvalidCode", "description": "The verification code is invalid or has expired." } + { "name": "InvalidCode", "description": "The verification link is invalid or expired." }, + { "name": "InvalidUsername", "description": "The username is invalid." }, + { "name": "EmailAlreadyRegistered", "description": "An account already exists for this email." } ] } } diff --git a/lexicons/temp/account/resendSignup.json b/lexicons/temp/account/resendSignup.json new file mode 100644 index 000000000..62fdd3248 --- /dev/null +++ b/lexicons/temp/account/resendSignup.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.account.resendSignup", + "defs": { + "main": { + "type": "procedure", + "description": "Re-send the signup verification link for a pending signup. Re-mails the same live link (same token, no new invite code) for a signup begun but not yet completed; fails when nothing is in flight for the email or the link has expired.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["email"], + "properties": { + "email": { + "type": "string", + "description": "Email address used to begin the signup." + } + } + } + }, + "errors": [ + { "name": "SignupDisabled", "description": "Signup is not currently enabled on this service." }, + { "name": "InvalidEmail", "description": "The email address is not valid." }, + { "name": "NoPendingSignup", "description": "There is no pending (unexpired) signup for this email; start again from the signup page." }, + { "name": "TooManyRequests", "description": "A signup email was sent for this address very recently; wait before asking for another." } + ] + } + } +}