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:
@@ -55,6 +55,9 @@ type Query {
|
||||
oidcProviders: [OIDCProviderInfo!]!
|
||||
@goField(forceResolver: true)
|
||||
@session(required: OPTIONAL)
|
||||
signUpEnabled: Boolean!
|
||||
@goField(forceResolver: true)
|
||||
@session(required: NONE)
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
|
||||
Reference in New Issue
Block a user