mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-16 05:36:50 +00:00
docs(auth): Move legacy auth page to rego page (see desc)
The commit moves legacy.mdx to registration.mdx and significantly shortens it. Instead of explaining every registration option now a table is provided. Renaming the page because besides registration there is not much else to explain about legacy auth. If anything, those should be elaborated on the main authentication.mdx page (i.e. difference between OAuth and UIAA) The email section has also been updated with (some) relevant info.
This commit is contained in:
1 parent
b3a15fc305
commit
385f6639c4
3 files changed
+49
-48
No files matched your search
@@ -0,0 +1,12 @@
|
||||
[
|
||||
{
|
||||
"type": "file",
|
||||
"name": "registration",
|
||||
"label": "Registration"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"name": "oidc",
|
||||
"label": "OIDC Delegated authentication"
|
||||
}
|
||||
]
|
||||
@@ -1,48 +0,0 @@
|
||||
import { Tab, Tabs } from '@rspress/core/theme';
|
||||
|
||||
# Legacy Authentication
|
||||
|
||||
## Registration
|
||||
|
||||
Registration is disabled by default. To enable it, set `allow_registration = true` in your config file and follow one of the registration methods below.
|
||||
|
||||
### Admin-issued tokens (recommended)
|
||||
|
||||
Homeserver admins can generate short-lived or single-use tokens from the admin room. This is the recommended method for private or invite-only homeservers, and requires no extra configuration.
|
||||
|
||||
See the [`!admin token issue`](../reference/admin/token.md) command for further details.
|
||||
|
||||
### Static token
|
||||
|
||||
Static tokens allow users to provide a shared secret upon registration. It can be set via the following two ways:
|
||||
|
||||
<Tabs groupId="static-token-methods">
|
||||
<Tab label="In the config file">
|
||||
|
||||
```toml title="continuwuity.toml"
|
||||
allow_registration = true
|
||||
registration_token = "o&^uCtes4HPf0Vu@F20jQeeWE7"
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab label="Read from a file">
|
||||
|
||||
```toml title="continuwuity.toml"
|
||||
allow_registration = true
|
||||
registration_token_file = "/etc/secrets/.registration_token"
|
||||
```
|
||||
|
||||
```txt title="/etc/secrets/.registration_token"
|
||||
o&^uCtes4HPf0Vu@F20jQeeWE7
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
When both options are set, `registration_token_file` takes priority.
|
||||
|
||||
Please note that the static token does not follow any limited time scope or usage scope.
|
||||
|
||||
### reCAPTCHA
|
||||
|
||||
## Email verification
|
||||
@@ -0,0 +1,37 @@
|
||||
# Registration
|
||||
|
||||
Registration is disabled by default. To enable it, set `allow_registration = true` in your config file and configure at least one of the registration methods below.
|
||||
|
||||
## Registration methods
|
||||
|
||||
| Method | Additional configuration needed |
|
||||
| ------------------------------------------------------ | ------------------------------------------------------------------------ |
|
||||
| Admin-issued tokens (recommended) | None. Use the `!admin issue token` command |
|
||||
| Static registration token | `registration_token` or `registration_token_file` |
|
||||
| reCAPTCHA-only registration | `recaptcha_site_key` and `recaptcha_private_site_key` |
|
||||
| Static token + reCAPTCHA | Set both requirements above |
|
||||
| Require additional email for token-based registrations | `require_email_for_token_registration = true` in `[global.smtp]` section |
|
||||
| Email only | `require_email_for_registration = true` in `[global.smtp]` section |
|
||||
|
||||
Admin-issued tokens is the recommended method of registration. These tokens can be scoped with an expiry duration or maximum times used, and are suited for private/invite-only homeservers. See the `!admin token` commands for more details.
|
||||
|
||||
Other registration methods are meant for **untrusted, public registration**. Care must be taken when allowing these modes of operation.
|
||||
|
||||
Challengeless registration (i.e. "open registration" where only a username and password is needed) is not supported in standard builds. See [#2071][pr-2071] for more details.
|
||||
|
||||
[pr-2071]: https://forgejo.ellis.link/continuwuation/continuwuity/issues/2071
|
||||
|
||||
## Email configuration
|
||||
|
||||
Continuwuity can be configured to send emails via an SMTP relay of your choice. These are used for verifying user email addresses, and sending password resets links to them.
|
||||
|
||||
A user is associated with only **one** email address at a time.
|
||||
|
||||
All email options are in the `[global.smtp]` block of the configuration file, and are toggled on when the block is uncommented. For example:
|
||||
|
||||
```toml
|
||||
[global.smtp]
|
||||
# Example URI for the user john@example.com on the `mail.example.net` mail server
|
||||
connection_uri = "smtps://john%40example.com:password@mail.example.net:465"
|
||||
sender = "John's Continuwuity server <john@example.com>"
|
||||
```
|
||||
Reference in new issue
Block a user