Summary
When logging in and auto provisioning accounts with an SSO provider the account is created with a username matching a user's name and not the expected preferred_username claim.
It is much easier to change a display name that may be off than the actual username of SSO created users as that requires a password to be set that these users, if auto-created, wouldn't have.
Steps to reproduce
Enabled SSO and setup a provider
Enable auto-provision
Enable require SSO
Log in with a non existing fluxer user via SSO.
Observe username is the SSO users actual name set in the SSO provider.
Environment
Self Hosted docker environment
6 comments
Comment by @Buco7854
prefered_usernameclaim and the name thegiven_name(it seems to currently use it for both), users can actually set their password (and therefore change their username) even when SSO provisionned. If "require SSO" is not enabled they can even login with their email/password. Only thing that change is 2FA being bypassed by SSO.Comment by @InsertDisc
Off-topic comment by @InsertDisc
Comment by @gmpinder
Comment by @InsertDisc
Comment by @TheGreenkey