How to configure the OIDC to set the Username as the email account name or a username like value returned from my auth providers?

Hi there,

How can I configure the OIDC to set the Username as the email account name or a username like value returned from my auth providers. In below screenshot, the Username user2091 looks like generated from a pattern, which isn’t what I want (It’s not editable neither probably caused by some settings I did). How can I make it as “abc” if the email return as “abc@example.com”?

In my discourse OIDC config, I only set openid email profile besides the minimal config required like example. Should I set something else,
for example, openid connect claims for something?

1 Like

The Discourse OIDC plugin will use the ‘nickname’ claim provided by the identity provider. So you’ll need to review the documentation for your identity provider and work out how to make it send the ‘nickname’ value that you’d like.

4 Likes

Thanks @david. That’s my providers not return the value. Able to display the username from the providers now.

1 Like