Apply standard registration flow to single-sign-on sign-ups
What does this MR do and why?
Resolves #339256
- Changes the single-sign on registration flow to match the standard registration flow.
- This change only affects the registration users/sign_uppage. If a new user single-sign's on from the sign-in pageusers/sign-inthen they get taken to the dashboard.
Screenshots or screen recordings
How to set up and validate locally
- Create an OAuth app in Github
- Add Github as an omniauth provider in config/gitlab.yml
development:
  <<: *base
  omniauth:
    allow_single_sign_on: ['github']
    block_auto_created_users: false
    providers:
      - { name: 'github',
          app_id: 'YOUR_APP_ID',
          app_secret: 'YOUR_APP_SECRET',
          url: "https://github.com/",
          verify_ssl: false,
          args: { scope: 'user:email' } }- Enable the feature flag
$ bundle exec rails c
Feature.enable(:update_oauth_registration_flow)- If you want to retest the flow multiple times, you can delete the records from the following tables:
$ user_id = User.find_by(email: 'YOUR_OAUTH_EMAIL').id
$ Identity.find_by(user_id: user_id).delete
$ User.find(user_id).deleteMR 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 Hinam Mehra