bcgov / ocp-sso

BCGov Single Sign-On KeyCloak
http://oidc.gov.bc.ca/
Apache License 2.0
8 stars 8 forks source link

FAQ: BC Services card users sometimes see "User with username ABC already exists" #387

Closed arcshiftsolutions closed 3 years ago

arcshiftsolutions commented 3 years ago

Describe the bug Users log into client websites with their BC Services Card and receive a prompt from SSO that their user already exists.

image

To Reproduce Steps to reproduce the behavior:

  1. Start with a fresh BCSC which has not logged into the environment
  2. Use the standard First Login Authentication flow
  3. Have the user log in
  4. See error message above

Expected behavior User should logged in without any additional prompts.

Additional context This issue was found and fixed by the Health Gateway team, @ninosamson & Brad Head.

The issue was traced to a problem with the standard First Broker Login flow.

As below causes the issue to occur:

image For the fix, create a custom First Broker Login flow with the following items:

bcsclogin

With the above, users are able to flow through their login.

Note that the Registries team (@sumesh-aot ) also provided their custom First Broker Login flow which works as well:

Screen Shot 2021-06-21 at 12 13 36 PM

Note that the new login flow needs to be assigned to your IDP for BCSC.

image