# Bug OP-13214 - OAuth remapping of existing users using case sensitive login match while user registration does not

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-13214

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 13.0.2 |
| Observed in versions |  |
| Sprint | 13.0.2 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Create a password-based user in OpenProject [firstname.lastname@provider.com](mailto:first.lastname@provider.com) *(all lower case)*
2.  Create user in IdP (identity provider, e.g. Okta, Keycloak) <Firstname.Lastname@provider.com> *(F and L upper case\!)*
3.  Connect OpenProject to IdP
4.  Try logging in using OIDC with the user from 2)

### What is the buggy behavior?

  - The user won't be logged in
  - A registration dialog is shown with 2 errors:
      - login and email are already taken

### What is the expected behavior?

  - The user should be logged in, taking over the existing password-based user

**OpenProject version**

*v13.0.1*

### Implementation notes

This is because the login is matched exactly when looking up existing users to login via OAuth while the user registration matches with existing users without taking case into consideration.
