Files
RenewCMS/docs/design/screens/accept-invite.md
T

3.1 KiB
Raw Blame History

Accept invite

Route: /invite/accept?c=CODE. API: GET /v1/auth/invite?c= (pending) · POST /v1/auth/invite/accept (pending).

Opened from the invitation email. The link carries only the code, so the invited email is looked up on load and shown read-only. Username and password follow the Register rules, including PasswordStrengthHint. On success the person is logged in and sent to /home with a toast; they are already verified because the invite went to their email.

Visual reference: RenewCMS Screens Auth.dc.html, groups "Accept invite". Frames: AppFrame.dc.html (shell, sidebar, topbar, drawer) plus the screen frame where listed in components.md.

Copy per state (generated from the board source, pass 2)

Every state below is drawn in light and dark (theme switch on the board), at 1440×900 and 390×844 (both frames sit side by side). Board: RenewCMS Screens Auth.dc.html. Copy is exact; where a cell is empty the state reuses the fixed copy.

Base copy

  • Accept your invite
  • Choose a username and password to finish setting up your account.
  • Accept invite
  • Already have an account?
  • Log in

Accept invite (group "Accept invite", 10 states)

Route: /invite/accept?c=CODE. API: GET /v1/auth/invite?c= (pending) · POST /v1/auth/invite/accept (pending).

Opened from the invitation email. The link carries only the code, so the invited email is looked up on load and shown read-only. Username and password follow the Register rules, including PasswordStrengthHint. On success the person is logged in and sent to /home with a toast; they are already verified because the invite went to their email.

# State Trigger Copy
1 Checking the link On load, while the invite is looked up. "Checking your invite…"
2 Default The code is valid and unused.
3 Validation errors Checked on blur and on submit, using the same rules as Register. Nothing is sent. "Use 3 to 20 characters."
4 Filled, valid Every rule is met and the checklist item turns green.
5 Submitting Fields and button are disabled. "Creating account…"
6 Username taken (409) Another user has that username. The value is kept and the field gets focus. "That username is taken. Try another."
7 Invalid or used link (404) The code is wrong, was already accepted, or is missing from the URL. No form is shown. "This invite link doesn't work" / "It may be incomplete, or it may already have been used. If you already set up your account, log in instead." / "Open the link from your email again, or copy the full address into your browser." / "Go to log in"
8 Expired link (410) The invite is older than 3 days. "This invite has expired" / "Invites work once, for 3 days. Ask the person who invited you to send a new one." / "Go to log in"
9 Server error A 500 or no response. The values are kept. "Couldn't create the account" / "Something went wrong on the server. Try again in a moment."
10 Success 200 sets the session cookie → /home after 800 ms, with a toast. No verification step. "Your account is ready" / "Taking you to your dashboard…" / "Welcome to RenewCMS" / "You're logged in as lea."