Order of OIDC multiple account list
We use cPanel for academic projects in a university department.
We recently changed to require all of our cPanel users to log in with OIDC to our university authentication system (and we pre-register the users). This allows easy access and adds Multi-Factor Authentication. When users have multiple linked cPanel accounts, it seems like the accounts show up in a random order and it changes on every login. Is there any way to make it always show up in the same order, preferably alphabetical?
During the transition period, we also noticed that the OIDC buttons on the login page also change order randomly.
Both of those annoy users and break muscle-memory.
-
Thanks for submitting the feature request - I don't have a way to get the order changed, so the feature request is the way to go with this for sure. I've messaged the team that gets that approved so that will happen soon. 0 -
I've messaged the team that gets that approved so that will happen soon.
I have had feature requests and comments sitting in moderation for months, I was wondering if the site was being used anymore...0 -
Our long-term plan is to completely overhaul the features site so it's much easier to use. If you see something sitting in moderation, feel free to poke me and I'll check it out. 0 -
Feature request: Always show OIDC login options in the same order 0 -
So the feature request is marked as "Not Planned". I finally got annoyed and checked what would be involved in making this happen - we are talking about a one or two line code change to make the users be always sorted alphabetically... I know cPanel isn't open source, but I'm just going to put what I did here and hope in gets added. In the mean time, I will just make the change on my own servers (and fix it every time there is an update). In the file /usr/local/cpanel/Cpanel/Server/Handlers/OpenIdConnect.pm
, in_handle_openid_need_to_select_user
(line 441 for me), just before the call to show the login page, I added: [code=perl]my $linked_users_sorted; @{$linked_users_sorted} = sort { $a->{username} cmp $b->{username} } @{$linked_users_};
and just below that [CODE=perl] 'linked_users' => $linked_users_sorted,
It looks like the same code could be used for a simple alphabetical sort for the providers in/usr/local/cpanel/Cpanel/Security/Authn/OpenIdConnect.pm
, inget_available_openid_connect_providers
.0 -
I see "Fixed case CPANEL-40510: Sort authentication providers on login page." in the EDGE release notes. Is that talking about this? 0 -
Yes! This change will keep the additional buttons/login options on the page in a consistent order. 0
Please sign in to leave a comment.
Comments
9 comments