Skip to main content

Public Registration

RiDDiX - Matrix Synapse Panel provides a branded public registration page where invited users can create their Matrix accounts using invitation tokens.

Registration Flow

The registration process follows the standard Matrix User-Interactive Authentication (UIA) flow:

  1. User opens the registration page — optionally with a server slug and pre-filled token in the URL
  2. Server resolution — the portal determines which Synapse homeserver to register against
  3. Token validation — the invitation code is verified against Synapse before submission
  4. Registration submission — a multi-stage UIA flow:
    • Initiate registration with username and password
    • Complete m.login.registration_token stage with the invitation code
    • Complete m.login.dummy stage if required
    • Complete m.login.terms stage if required
  5. Success — the user receives confirmation with their Matrix ID and post-registration instructions

Registration URL Format

https://portal.example.com/register?server=<slug>&token=<code>
ParameterRequiredDescription
serverNoServer slug (e.g., main-server). Falls back to default server.
serverIdNoServer ID (alternative to slug).
tokenNoPre-fills the invitation code field.

Examples:

  • https://portal.example.com/register — uses default server
  • https://portal.example.com/register?server=main-server — specific server
  • https://portal.example.com/register?server=main-server&token=abc123 — pre-filled code

Registration Form Fields

FieldValidationDescription
Invitation CodeRequired, validated against SynapseThe registration token
UsernameRequired, [a-z0-9._=-]+, max 255Matrix localpart
PasswordRequired, min 8 charactersAccount password
Confirm PasswordMust match passwordPassword confirmation
Display NameOptional, max 255Initial display name

Server Resolution

When the registration page loads, it resolves the target server:

  1. Check serverId query parameter → look up by ID
  2. Check server query parameter → look up by slug
  3. Check domain → match against publicDomain field
  4. Fall back to the default enabled server

If no server can be resolved, an error message is shown.

Branding Integration

The registration page dynamically applies the server's branding profile:

  • Theme colors — primary, secondary, accent, background, panel, text
  • Typography and styling — button style, input style, border radius, shadows, spacing
  • Layout — centered, split-screen, left-image, top-branding, or compact
  • Content — welcome headline, registration text, success message, footer, support text
  • Assets — logo, favicon, hero image, background image
  • Links — privacy policy, imprint, terms of service, help page
  • Post-registration — homeserver display name, client recommendation, instructions

See Branding for details.

Error Handling

The portal provides user-friendly error messages for common Synapse errors:

Synapse ErrorUser Message
M_USER_IN_USEThis username is already taken.
M_INVALID_USERNAMEThe username contains invalid characters.
M_EXCLUSIVEThis username is reserved by the server.
M_WEAK_PASSWORDThe password is too weak.
M_FORBIDDENRegistration is not permitted.
M_LIMIT_EXCEEDEDToo many requests. Please try again later.
M_UNKNOWN_TOKENThe invitation code is invalid or has expired.

Additional portal-specific errors:

CodeDescription
MSC3861_INCOMPATIBLEServer uses delegated auth — token registration not available
TOKEN_FLOW_UNAVAILABLEregistration_requires_token not enabled in Synapse
ADDITIONAL_STAGES_REQUIREDUIA requires stages the portal doesn't support

Rate Limiting

Registration and token validation endpoints are rate-limited:

  • Default: 15 requests per 15-minute window per IP
  • Configurable via RATE_LIMIT_WINDOW_MS and RATE_LIMIT_MAX_REQUESTS