fix(auth): an invite is the only way to an account
The README offered open registration, and the register handler still had a branch for a registration_settings mode nothing could set. Now every account after the first needs an invite; the first still needs the setup token from the log. Migration 0110 drops registration_settings and its queries, and backups no longer carry it (an older backup that holds it restores without it). The web form asks for the invite token as required. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
case 'password_too_short':
|
||||
return 'Password must be at least 8 characters.';
|
||||
case 'invite_required':
|
||||
return 'This server requires an invite token to register. Ask an admin for one.';
|
||||
return 'An invite token is needed to register. Ask an admin of this server for one.';
|
||||
case 'invite_invalid':
|
||||
return 'That invite token is invalid, expired, or already used.';
|
||||
case 'username_taken':
|
||||
@@ -162,15 +162,16 @@
|
||||
</label>
|
||||
{:else}
|
||||
<label class="block">
|
||||
<span class="mb-1 block text-sm text-text-secondary">
|
||||
Invite token <span class="text-text-secondary opacity-60">(if required by your server)</span>
|
||||
</span>
|
||||
<span class="mb-1 block text-sm text-text-secondary">Invite token</span>
|
||||
<input
|
||||
type="text"
|
||||
autocomplete="off"
|
||||
class="w-full rounded border border-border bg-background px-3 py-2 outline-hidden focus:border-accent"
|
||||
spellcheck="false"
|
||||
required
|
||||
class="w-full rounded border border-border bg-background px-3 py-2 font-mono outline-hidden focus:border-accent"
|
||||
bind:value={inviteToken}
|
||||
/>
|
||||
<span class="mt-1 block text-xs text-text-secondary">Ask an admin of this server for one.</span>
|
||||
</label>
|
||||
{/if}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user