Repository navigation
fix(account): allow provider sign-up independently of DISABLE_SIGNUP - #11113
Open
MichaelUray wants to merge 1 commit into
Open
MichaelUray wants to merge 1 commit into
MichaelUray wants to merge 1 commit into
Conversation
The account service passed !hasSignUp, derived only from DISABLE_SIGNUP, into registerProviders. Disabling password sign-up therefore also stopped first-time users from getting an account through Google, GitHub or OpenID Connect. Many self-hosted setups want the reverse: no open password sign-up, while the identity provider stays in charge of who may join. Add isProviderSignUpDisabled() in the account package and use it for the auth providers. Provider sign-up still follows DISABLE_SIGNUP by default, so existing deployments keep their behaviour. Setting ALLOW_PROVIDER_SIGNUP=true keeps provider sign-up enabled while password sign-up stays disabled. Invite/auto-join handling is unchanged. Document the variable next to DISABLE_SIGNUP in the dev and ws-tests compose files and the VS Code launch config, and add unit tests. Fixes hcengineering#10915 Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10915
Problem and change
The account service passed !hasSignUp, derived only from DISABLE_SIGNUP, into
registerProviders. Disabling password sign-up therefore also stopped first-time
users from getting an account through Google, GitHub or OpenID Connect. Many
self-hosted setups want the reverse: no open password sign-up, while the
identity provider stays in charge of who may join.
Add isProviderSignUpDisabled() in the account package and use it for the
auth providers. Provider sign-up still follows DISABLE_SIGNUP by default, so
existing deployments keep their behaviour. Setting ALLOW_PROVIDER_SIGNUP=true
keeps provider sign-up enabled while password sign-up stays disabled.
Invite/auto-join handling is unchanged. Document the variable next to
DISABLE_SIGNUP in the dev and ws-tests compose files and the VS Code launch
config, and add unit tests.
Tests
New unit tests in
server/account/src/__tests__/utils.test.tsforisProviderSignUpDisabled()(default followsDISABLE_SIGNUP,ALLOW_PROVIDER_SIGNUP=trueoverrides it).