Use the preferred_username claim as the Mattermost username for OpenID Connect.
OpenID Connect (OIDC) has been added to the latest Mattermost Enterprise Edition. However, Mattermost seems to use the user's email address as the Mattermost username.
According to the OIDC specification, the standard response contains a preferred_username claim and the value of this field should be used as the user name.
When the preferred_username field of some IdPs is a mailbox (e.g. Google Login), only then is the mailbox prefix considered as the username.
22
votes
Zero Clover
shared this idea
-
Aaron Wiles commented
+1
is there a workaround for this? We don't set emails in our air-gapped env.
-
Ankesh Anand commented
+1
-
Jonathan Wright commented
+1. Please follow the spec.