mx-invite
A simple way to have an invite code system for a Synapse server.
Required endpoints
The following APIs on the homeserver are required for functionality:
/_synapse/admin/v1/registration_tokens/new/_matrix/client/v3/account/whoami/_matrix/client/v3/logout/_matrix/client/v3/login
Configuration
The configuration file is config.toml and must be in the same folder as index.py.
Configuration options
db_uri, required: The DB URI, e.g.postgresql://postgres@localhost/mx_invites. Currently only PostgreSQL is supported.homeserver_url_base, required: The homeserver base URL, e.g.http://127.0.0.1:8008. Runningmx-invitein the same environment as Synapse is recommended.flask_secret_key, required: The secret key Flask uses to sign session IDs. Changing this will invalidate all sessions.admin_access_token, required: Access token of an administrator on the Synapse instance.public_url_prefix: The URL prefix formx-inviteto run on and redirect to. Defaults to/mx-invite/.days_until_expiry: How many days an unused registration token should be valid for. Defaults to3.code_length: How long registration tokens should be. Defaults to16, maximum is64.uses_per_code: How many uses are allowed per registration token. Defaults to1.
Description
Languages
Python
63.3%
HTML
36.7%