Show registration unavailable page when signup is disabled

Instead of showing the signup form and returning an internal error on
submit, the SignUpPage now queries signUpEnabled upfront and displays a
friendly message explaining that registration is not available, with a
link back to login.

Adds a signUpEnabled GraphQL query field on the connect/v1 API and
handles ErrSignupDisabled as a FORBIDDEN error in the SignUp resolver.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-04-08 18:29:36 +02:00
parent ab5f42ad74
commit 76f6c8f9d1
4 changed files with 64 additions and 2 deletions

View File

@@ -55,6 +55,9 @@ type Query {
oidcProviders: [OIDCProviderInfo!]!
@goField(forceResolver: true)
@session(required: OPTIONAL)
signUpEnabled: Boolean!
@goField(forceResolver: true)
@session(required: NONE)
}
type Mutation {