mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-07-21 21:52:53 +00:00
7e50969d02
A slug typed into the deSEC form was lost when the form re-rendered after a 201 redirect (e.g. on the awaiting-verification step), forcing the user to re-enter it. Persist the requested slug in the AIO config when register() runs and pre-fill the slug input from it on every step, then clear it once a domain is set. Stored in configuration.json rather than a URL parameter so it survives the multi-step flow without leaking into the iframe address. Signed-off-by: Simon L. <szaimen@e.mail.de> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
34 lines
4.5 KiB
Twig
34 lines
4.5 KiB
Twig
<h2>Get a free domain from deSEC</h2>
|
||
<p><a target="_blank" href="https://desec.io">deSEC</a> offers free dynamic DNS subdomains under <strong>dedyn.io</strong>. AIO can register an account and a subdomain for you automatically. The <strong>caddy</strong> community container will be enabled as a reverse proxy, the <strong>dnsmasq</strong> container will be enabled for local DNS resolution, and the mastercontainer will keep your DNS record up to date automatically.</p>
|
||
{% if desec_awaiting_verification %}
|
||
<p>⚠️ A deSEC account for <strong>{{ desec_email }}</strong> was requested but it could not be used yet. Please check your inbox: if deSEC sent you a verification email, click the link inside, then click the button below to finish setting up your domain.</p>
|
||
<p>If this email address already had a deSEC account, no new account was created and no verification email was sent. In that case, enter your existing deSEC password below and try again to log in with it.</p>
|
||
<form method="POST" action="api/desec/register" class="xhr">
|
||
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
|
||
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
|
||
<input type="password" name="desec_password" placeholder="Existing deSEC password (only if you already had an account)" autocomplete="current-password" />
|
||
<input type="text" name="desec_slug" value="{{ desec_slug|default('') }}" placeholder="my-nextcloud (optional)" pattern="[a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?" title="Only lowercase letters, digits and hyphens (1–63 characters). No leading or trailing hyphen." />
|
||
<input type="submit" value="I have verified my email – register domain" />
|
||
</form>
|
||
{% elseif desec_account_registered %}
|
||
<p>Your deSEC account (<strong>{{ desec_email }}</strong>) was registered successfully but the domain could not be registered. Please enter a desired subdomain slug (the part before <code>.dedyn.io</code>) and try again, or leave it blank for a random one.</p>
|
||
<form method="POST" action="api/desec/register" class="xhr">
|
||
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
|
||
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
|
||
<input type="text" name="desec_slug" value="{{ desec_slug|default('') }}" placeholder="my-nextcloud (optional)" pattern="[a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?" title="Only lowercase letters, digits and hyphens (1–63 characters). No leading or trailing hyphen." />
|
||
<input type="submit" value="Register free domain via deSEC" />
|
||
</form>
|
||
{% else %}
|
||
<p>Please enter your email address. You can also enter a desired subdomain slug (the part before <code>.dedyn.io</code>); leave it blank for a random one.</p>
|
||
<p>If you already have a deSEC account for this email address, enter your deSEC password in the optional password field below to log in with it instead of creating a new account. When creating a new account, deSEC will email you a verification link that you must click before the domain can be set up.</p>
|
||
<form method="POST" action="api/desec/register" class="xhr">
|
||
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
|
||
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
|
||
<input type="email" name="desec_email" placeholder="your@email.com" required />
|
||
<input type="password" name="desec_password" placeholder="deSEC password (only if already registered)" autocomplete="current-password" />
|
||
<input type="text" name="desec_slug" value="{{ desec_slug|default('') }}" placeholder="my-nextcloud (optional)" pattern="[a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?" title="Only lowercase letters, digits and hyphens (1–63 characters). No leading or trailing hyphen." />
|
||
<input type="submit" value="Register free domain via deSEC" />
|
||
</form>
|
||
<p><strong>Note:</strong> By submitting this form you agree to the <a target="_blank" href="https://desec.io/terms">deSEC terms of service</a>. The registered domain and your deSEC account credentials are stored in the AIO configuration. After registration, set your router's DHCP DNS server to this machine's local IP address so LAN devices resolve the domain locally (see the <a target="_blank" href="https://github.com/nextcloud/all-in-one/tree/main/community-containers/dnsmasq">dnsmasq documentation</a>). Alternatively adjust the hosts files on your clients so that they can reach the server using the local ip-address.</p>
|
||
{% endif %}
|