jojo/routers/web/auth
Nils Goroll d934e0c9fb chore: refactor signup logic (#10915)
This PR is in preparation of, but independent of, an upcoming suggestion for a feature addition:

* The first commit moves a tiny bit of logic into a separate function to prepare for extension of that logic, avoiding duplication
* The second commit moves checking for disabled registrations earlier, which, I think, has merits in terms of performance and resilience (hopefully not significant, but who knows?)
* The third commit adds simple unit tests for SignUp() and SignUpPost() to avoid the long-ish roundtrip over integration tests
*  The forth commit introduces `ctx.Data["DisableRegistrationReason"]` for the signup template to use as the reason printed if `.DisableRegistration` to prepare for other reasons to be added

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10915
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Nils Goroll <nils.goroll@uplex.de>
Co-committed-by: Nils Goroll <nils.goroll@uplex.de>
2026-01-26 22:55:30 +01:00
..
2fa.go fix: do 2FA on OpenID connect 2025-08-30 09:41:20 +02:00
auth.go chore: refactor signup logic (#10915) 2026-01-26 22:55:30 +01:00
auth_test.go chore: refactor signup logic (#10915) 2026-01-26 22:55:30 +01:00
linkaccount.go chore: add email blocklist unit test 2025-08-30 09:45:19 +02:00
main_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
oauth.go chore: do not pass the full signing key to template (#10967) 2026-01-26 14:47:48 +01:00
oauth_test.go chore: do not pass the full signing key to template (#10967) 2026-01-26 14:47:48 +01:00
openid.go chore: unify the usage of CryptoRandomString (#10110) 2025-11-15 13:24:53 +01:00
password.go fix: allow unactivated users to send recovery mails (#9504) 2025-10-03 07:16:24 +02:00
webauthn.go fix: do 2FA on OpenID connect 2025-08-30 09:41:20 +02:00