Enable SSO and ensure trial registrations perform onboarding steps
-
Review changes -
-
Download -
Patches
-
Plain diff
What does this MR do and why?
Let SSO sign ups experience the new user onboarding as we have this on normal sign ups for growth reasons in SaaS and want to add to the SSO experience as well. Before, due to the verification loop, the user is dropped out of the onboarding loop. This MR will address
- users dropping out of the onboarding loop during verification or by simply navigating away to another page
- intention to start a trial being dropped
- users not completing onboarding in general for SSO
This will also address trial registrations through regular signup being able to exit the specific trial onboarding and defaulting back to non-trial on welcome page redirection.
This should not affect Group Saml, LDAP or other Oauth strategies. Only the social sign ons for SaaS.
This feature is behind the ensure_onboarding
feature flag.
Screenshots or screen recordings
SSO
- before sso trial registration, toggle for trial seen(wrong)
Screen_Recording_2023-05-08_at_2.01.35_PM
- after in sso trial registration, toggle not seen and wording is correct
Screen_Recording_2023-05-08_at_2.14.12_PM
Regular
- before trial registration, toggle for trial seen(wrong)
Screen_Recording_2023-05-09_at_3.33.22_PM
- after in trial registration, toggle not seen and wording is correct
Screen_Recording_2023-05-09_at_3.28.58_PM
How to set up and validate locally
note basically trying to emulate feature spec steps in ee/spec/features/registrations/saas/standard_flow_just_me_creating_project_spec.rb
- Setup to simulate SaaS and restart GDK
- Enable ensure onboarding feature flag and
check_namespace_plan
inrails console
Feature.enable(:ensure_onboarding)
ApplicationSetting.first.update(check_namespace_plan: true)
- Sign up for non SSO(fill in user name and password) with trial(with
/-/trial_registrations/new
path) and notice differences in screenshots above. - Confirm email by finding the confirmation path from last User created in
rails console
Rails.application.routes.url_helpers.user_confirmation_path(confirmation_token: User.last.confirmation_token)
- Sign up for SSO(user github or google)
- set your
development
gitlab.yml
config values - mine looked like the below, setup for github by going on github under developer settings for my profile, redacted my info:
- set your
development:
<<: *base
omniauth:
block_auto_created_users: false
allow_single_sign_on: true
providers:
- { name: 'google_oauth2',
app_id: '',
app_secret: '',
args: { access_type: 'offline', approval_prompt: '' } }
- { name: 'github',
app_id: 'xxxx',
app_secret: 'xxxxx',
args: { scope: "user:email" } }
- sign in by clicking the sign in button the trial page for the SSO provider(with
/-/trial_registrations/new
path) and notice differences in screenshots above. - Validate when on welcome page/almost there that you can redirect to root path and it will redirect you back correctly, staying in the trial.
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.
Related to #404926
Merge request reports
- version 311c3b47f3
- version 3055fb0c49
- version 2932b7a8e3
- version 28b47ba1f3
- version 27c1b6b63d
- version 2669670e58
- version 25a727da78
- version 24bf5cfe21
- version 23a83cf4fe
- version 2242c4a83e
- version 21e75ef7da
- version 2001aedc99
- version 19af5c48a7
- version 18e92a0579
- version 178ad8ed54
- version 1693bf7e05
- version 15086116b0
- version 14109eea3b
- version 1306b439ca
- version 12f2158ec2
- version 1158a62c13
- version 10b88a0ed3
- version 96f0d5b52
- version 88fd31296
- version 73863f994
- version 634d204bd
- version 5fb2b75d7
- version 4ea796dd0
- version 385a26dbc
- version 2a208f506
- version 119519c9e
- master (base)
- latest versionb0ec76485 commits,
- version 311c3b47f34 commits,
- version 3055fb0c494 commits,
- version 2932b7a8e33 commits,
- version 28b47ba1f32 commits,
- version 27c1b6b63d2 commits,
- version 2669670e582 commits,
- version 25a727da782 commits,
- version 24bf5cfe212 commits,
- version 23a83cf4fe2 commits,
- version 2242c4a83e2 commits,
- version 21e75ef7da2 commits,
- version 2001aedc991 commit,
- version 19af5c48a71 commit,
- version 18e92a05791 commit,
- version 178ad8ed541 commit,
- version 1693bf7e051 commit,
- version 15086116b01 commit,
- version 14109eea3b1 commit,
- version 1306b439ca1 commit,
- version 12f2158ec21 commit,
- version 1158a62c131 commit,
- version 10b88a0ed31 commit,
- version 96f0d5b521 commit,
- version 88fd312961 commit,
- version 73863f9941 commit,
- version 634d204bd1 commit,
- version 5fb2b75d71 commit,
- version 4ea796dd01 commit,
- version 385a26dbc1 commit,
- version 2a208f5061 commit,
- version 119519c9e1 commit,
- Side-by-side
- Inline