Save data from ArkoseLabs only if user has been persisted
Resolves https://gitlab.com/gitlab-org/gitlab/-/issues/389524
What does this MR do and why?
This updates the behavior of EE::RegistrationsController
to only record a new user's data from ArkoseLabs when their user DB record has already been created.
Why?
Without checking for persistence the controller throws an error and the registration flow is disrupted.
Screenshots or screen recordings
before | after |
---|---|
Screen_Recording_2023-01-27_at_4.52.01_PM | Screen_Recording_2023-01-27_at_4.55.33_PM |
How to set up and validate locally
Set up
- Toggle relevant feature flags and configure ArkoseLabs integration:
$ rails console > Feature.enable(:arkose_labs_signup_challenge) > ApplicationSetting.first.update({ arkose_labs_public_api_key: '****', arkose_labs_private_api_key: '****', arkose_labs_namespace: 'client' })
- Credentials are available in GitLab 1Password Engineering Vault
Validate
-
Go to the registration page
-
Fill up the form with duplicate username/email
-
Solve the ArkoseLabs challenge if presented
-
Validate that the registration form is re-rendered and the form errors are dipslayed:
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eugie Limpin