Keycloak - how to allow linking accounts without registration

Looks like they integrated this feature in version 4.5.0.

See automatic account link docs.

Basically you need to create a new flow and add 2 alternative executions:

  1. Create User If Unique

  2. Automatically Link Brokered Account


As per this discussion:

https://keycloak.discourse.group/t/link-idp-to-existing-user/1094/5

It’s a bug in keycloak and they seem to be a reluctant to fix it for whatever reason. I have very few users so I solved it by manually querying the idp for the information keycloak uses and then copying it into the relevant fields in the UI. So there is no sign up process for my users I just make them myself. Obviously that’s a poor solution though, what we really need is someone to take over that PR and persuade the maintainers to merge it.

This is the PR: https://github.com/keycloak/keycloak/pull/6282