Skip to content

Bugfix: Accept pending invitations for registrations via OAuth

Jessie Young requested to merge jy-issue-351441-oauth-signup-bug into master

What does this MR do and why?

Bug description:

When a new user is invited via email to a group or project, if they accept the invite and sign in via SSO, after login, they will be redirected to 404 page not found https://gitlab.com/groups/groupname/-/activity

The source of this bug was that users who signed up for GitLab via SSO did not have the group/project invitations accepted automatically.

After a user signs up for GitLab via an emailed invitation link, they are taken to the Project or Group that they were invited to after sign up is complete.

Because Group and Project invitations were not being automatically accepted for SSO users, being redirected to the Project or Group was resulting in errors for these users.

Bug report: #351441 (closed)

Screenshots or screen recordings

With this change, after a user who has been invited to a project signs up for GitLab with OAuth, they are now successfully redirected to https://gitlab.com/groups/groupname/-/activity with the correct flash message and their invitation has been accepted:

Screen_Shot_2022-08-08_at_2.32.18_PM

How to set up and validate locally

  1. Create new private group example-group
  2. Invite a user via email
  3. Click Join Now from the email
  4. Click Create Account using Google (or Sign in with any other SSO)
    1. Accept Terms if needed
  5. Taken to https://gitlab.com/groups/example-group/-/activity with no error

MR acceptance checklist

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

Edited by Jessie Young

Merge request reports

Loading