You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting a "Validation failed: Last name can't be blank" exception when trying to use OIDC.
To Reproduce
Configure your OIDC server so that it returns a name without any whitespace
Try to log in using OIDC
Observe crash
Expected behaviour
usernames without whitespace are supported.
Environment details
OS: all
Browser: all
Version: 3.3.4
Temporary workaround for people facing this issue
change the oidc.name_field option to some random value that doesn't exist, doing so will prevent the names from being updated
Additional information/context
the OIDC spec specifies the name field as End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. so we can't assume that it will be in any particular format. And even if we do, the name field is configurable via the uidc.name_field option and a user might want to use something like preferred_username instead, and that rarely will have any whitespace. The spec also includes given_name, family_name, and middle_name as part of the Standard Claims but not every provider supports them. See: https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.5.1
I have 10+ services configured in my OIDC provider and all of them can handle usernames just fine. Imo assuming anything about the name field is a recipe for disaster. The spec even mentions possibly including titles and suffixes, ordered according to the End-User's locale and preferences., and people all over the world can have different formats, prefixes, suffixes, middle names, etc.
Describe the bug
I'm getting a "Validation failed: Last name can't be blank" exception when trying to use OIDC.
To Reproduce
Expected behaviour
usernames without whitespace are supported.
Environment details
Temporary workaround for people facing this issue
change the
oidc.name_field
option to some random value that doesn't exist, doing so will prevent the names from being updatedAdditional information/context
the OIDC spec specifies the
name
field asEnd-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.
so we can't assume that it will be in any particular format. And even if we do, the name field is configurable via theuidc.name_field
option and a user might want to use something likepreferred_username
instead, and that rarely will have any whitespace. The spec also includesgiven_name
,family_name
, andmiddle_name
as part of theStandard Claims
but not every provider supports them. See: https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.5.1I have 10+ services configured in my OIDC provider and all of them can handle usernames just fine. Imo assuming anything about the name field is a recipe for disaster. The spec even mentions
possibly including titles and suffixes, ordered according to the End-User's locale and preferences.
, and people all over the world can have different formats, prefixes, suffixes, middle names, etc.problematic line:
postal/app/models/user.rb
Line 127 in da90e75
trace:
log (details redacted with
<REDACTED>
):The text was updated successfully, but these errors were encountered: