Repository navigation
deSEC: transmit requested domain during signup - #8995
Conversation
|
@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
Is that correct? Or not? Or missing something? |
pabzm
left a comment
There was a problem hiding this comment.
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 done! |
pabzm
left a comment
There was a problem hiding this comment.
Looks good and works well now, thank you! ❤️
|
@peterthomassen The latest commit lacks the signed-off-line, could you please fix that? |
|
@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>
61bd920 to
116d87a
Compare
|
done. |
|
@szaimen Any comment, or can we merge this? |
I havent reviewed it but I guess we can merge? |
|
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 |
Summary
3. to review, feature component)AI (if applicable)
The deSEC signup flow supports a
domainfield 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!