Skip to content

deSEC: transmit requested domain during signup - #8995

Merged
pabzm merged 3 commits into
nextcloud:mainfrom
peterthomassen:desec-signup-domain
Nov 24, 2026
Merged

pabzm merged 3 commits into
nextcloud:mainfrom
peterthomassen:desec-signup-domain

Conversation

@peterthomassen

Copy link
Copy Markdown
Contributor

Summary

  • The PR was tested and verified that it works locally
  • Or will be tested after merge on a dedicated test instance (available for maintainers)
  • Sign-off message is added to all commits
  • Tests (playwright if possible) are included
  • Screenshots before/after for front-end changes
  • Documentation has been updated or is not required
  • Labels added where applicable (ex: bug/enhancement, 3. to review, feature component)
  • Milestone next added

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

The deSEC signup flow supports a domain field in the account registration request, which provides various advantages, including immediate feedback on domain availability. Also, terms of service consent is collected after clicking the verification link, so I removed the "By clicking this, you agree ..." sentence. Also adjusted some other comments. Tested locally, works!

@pabzm

pabzm commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

@peterthomassen Thank you for the PR and welcome to the AIO project!

I'm a little confused what these changes do. My understanding is that they

  • allow to reset/retry a signup at desec.io in case the process got stuck,
  • and allow to specify a wanted sub-domain in the same step as the account signup, which makes the signup fail if the sub-domain is taken already,
  • and retry with random sub-domains in case the wanted sub-domain field was empty, until a free sub-domain name is found.

Is that correct? Or not? Or missing something?

@szaimen szaimen added 3. to review Waiting for reviews enhancement New feature or request labels Nov 10, 2026
@szaimen szaimen added this to the next milestone Nov 10, 2026
@pabzm
pabzm self-requested a review November 13, 2026 13:37

@pabzm pabzm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very good, thank you!

I found only one issue while testing it: the behaviour or rather just the error message if I put in my valid credentials into the deSEC login form, but enter a different subdomain slug. Then I always get to see that the domain would be taken. I tried with several random strings, though, so I'm pretty sure those were not all taken. I instead assume the issue to be, that no other slug may be given than the one used during signup.
I think that's a valid restriction, but it should be explained in a helpful message.
Could you please implement that?

@pabzm pabzm modified the milestones: v15.1.0, next Nov 13, 2026
@szaimen szaimen added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Nov 17, 2026
@peterthomassen

Copy link
Copy Markdown
Contributor Author

@pabzm done!

@peterthomassen
peterthomassen requested a review from pabzm November 18, 2026 23:41
@szaimen szaimen added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Nov 19, 2026
@szaimen szaimen modified the milestones: v15.1.1, next Nov 19, 2026

@pabzm pabzm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works well now, thank you! ❤️

@pabzm

pabzm commented Nov 23, 2026

Copy link
Copy Markdown
Member

@peterthomassen The latest commit lacks the signed-off-line, could you please fix that?

@pabzm

pabzm commented Nov 23, 2026

Copy link
Copy Markdown
Member

@peterthomassen And unfortunately there're merge conflicts, could you solve those, too?

Send the desired dedyn.io name in the "domain" field of POST /auth/ instead of
creating it with a separate POST /domains/ after email verification. deSEC
validates the name up front and rejects an unavailable one with 400 without
creating an account, so the user gets immediate feedback and can pick another
name. deSEC then creates the domain when the user activates the account, so
after login AIO only confirms it with a single GET.

A random slug is now drawn before signup and persisted, and the slug is fixed
while a new account awaits verification. Existing-account logins still create
the domain via POST /domains/ as before, including when the user falls back to
an existing password on the awaiting step.

If the name was taken before the user clicked the verification link, deSEC
deletes the pending account and login can never succeed. Add a "Start over"
action (POST /api/desec/reset) that clears the pending registration, and extend
the login hint to cover this case.

The deSEC mock validates the domain at signup, creates it on verification and
deletes the account when it cannot. The register spec covers the early
"not available" feedback, and a new spec covers the start-over path.

Assisted-by: ClaudeCode:claude-fable-5-1
Signed-off-by: Peter Thomassen <peter@desec.io>
Assisted-by: ClaudeCode:claude-fable-5-1
Signed-off-by: Peter Thomassen <peter@desec.io>
When logging in to an existing deSEC account that already has a dedyn.io
domain and asking for a different subdomain, deSEC answers POST /domains/
with 400 because only one dedyn.io domain is allowed per account. AIO treated
every 400 as a name collision and reported the requested name as "already
taken", whichever name was tried.

deSEC states the reason in the response, keyed by field. Show that message
instead, for a chosen as well as for a random subdomain, and stop retrying
random names on a 400, since another name cannot help in this case. The
registration form now also says that an account's existing dedyn.io
subdomain has to be entered to use it.

The deSEC mock enforces the one-domain rule and reports rejected names like
deSEC does. A new spec covers the explanation for a chosen, a random and a
foreign name, and that entering the existing subdomain completes the setup.

Assisted-by: ClaudeCode:claude-fable-5-2
Signed-off-by: Peter Thomassen <peter@desec.io>
@peterthomassen

Copy link
Copy Markdown
Contributor Author

done.

@pabzm

pabzm commented Nov 24, 2026

Copy link
Copy Markdown
Member

@szaimen Any comment, or can we merge this?

@szaimen

szaimen commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

@szaimen Any comment, or can we merge this?

I havent reviewed it but I guess we can merge?

@pabzm
pabzm merged commit 2be4bbb into nextcloud:main Nov 24, 2026
10 checks passed
@szaimen

szaimen commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

This is now released with v15.2.0 Beta. Testing and feedback is welcome! See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants