Skip to content

Ensure SSO signup through signin onboards correctly on SaaS

Doug Stull requested to merge 404926-fix-signin-click-sso-signup-dropoff into master

What does this MR do and why?

Ensure sso signup through signin onboards

  • before users would fall off of the onboarding process when they signed up by clicking sso buttons on the sign in page. This fixes that and ensures they continue onboarding.

Changelog: other EE: true

Screenshots or screen recordings

Before After
Screen_Recording_2023-05-25_at_10.29.30_AM Screen_Recording_2023-05-25_at_10.38.33_AM

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

  1. Setup to simulate SaaS and restart GDK
    • Make sure Admin > Settings > General > Sign Up Restrictions match the below (no admin approval, but hard email confirmation) image
  2. Enable ensure onboarding feature flag and check_namespace_plan in rails console
    • Feature.enable(:ensure_onboarding)
    • ApplicationSetting.first.update(check_namespace_plan: true)
  3. Setup for SSO(user github or google) and restart GDK
    • 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:
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" } }
  1. sign in by clicking the sign in button on the sign in page for the SSO provider(with /users/sign_in path) and notice differences in screenshots above.
  2. Validate when on welcome page/almost there that you can redirect to root path and it will redirect you back correctly, staying in the onboarding.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #404926

Edited by Doug Stull

Merge request reports