Rocket.chat: Stick with initial username for OAuth registration

Created on 19 Jan 2017  路  6Comments  路  Source: RocketChat/Rocket.Chat

Your Rocket.Chat version: 0.48.1

Hi,

We allow login exclusively by Google OAuth, and don't allow users to change their usernames. So user Joe Smith gets username joe.smith by default. However upon registration, the user is given a chance to change the username - not having read our internal RC docs, some users do this, which causes logistical problems later. It would be great to have an option, something like "Allow change of default OAuth username".

Planned app settings oauth / sso

Most helpful comment

Hey!

The newer version has a property for custom oauth called 'username field'. That, and 'merge users'.
You do however have to create a NEW custom oauth to show those options.

Say, for instance, your identity callback gets you {id: 53, username: "pony"}
You set the 'username field' in your oauth settings to 'username'.
I also hit the 'no new registrations' and 'merge users' for good measure.
So really... you CAN make it work, but this should be done to make it good (probably their own tickets):

  • Document oauth setup better
  • Add so that the new fields show up on old custom oauth's in the list.

All 6 comments

We can have a setting for that, but not just on the registration, we should be on the profile too.

Having the same issue! :). Willing to hoist a bit of money out of my own pocket for a fix, but not sure how and what range?

Or, otherwise, hints on where to add the specific code in the best way. I have been hacking at the oauth code before (though that resulted in disaster and other people rewrote it. uhm..), and it looks like it would be able to skip the form if the username is not taken (it needs to error out otherwise)

Hey!

The newer version has a property for custom oauth called 'username field'. That, and 'merge users'.
You do however have to create a NEW custom oauth to show those options.

Say, for instance, your identity callback gets you {id: 53, username: "pony"}
You set the 'username field' in your oauth settings to 'username'.
I also hit the 'no new registrations' and 'merge users' for good measure.
So really... you CAN make it work, but this should be done to make it good (probably their own tickets):

  • Document oauth setup better
  • Add so that the new fields show up on old custom oauth's in the list.

@karlprieb @rodrigok Any updates on this? @magnusjjj Your ideas are nice, but really it should just be an option for the admin. :)

Let's add an option to auto set the username if it is unique when using 3rd party logins.

Was this page helpful?
0 / 5 - 0 ratings