Skip login page if there is only one authentication client
Hi. I have one unique OIDC authentication client with my humhub installation, and this will not change in the future. Thus, displaying the regular signin form is useless for me and I would like to skip this screen and automatically redirect to my OIDC provider login page. I could not find documentation about this.
Is there a way to achieve this? If not, I suggest implementing this feature.
What do you think?
There's currently no way to achieve it. We won't likely work on it ourselves but will gladly accept a pull request implementing it.
Ok I may try to look at this then. Before I start, do you have clues or expectations on how this should be done?
- It should be optional and turned off by default.
- If there is a single client, no choice screen should be displayed and auth should be performed for that client right away.
Is a javascript redirection OK or do you prefer the redirection being made serverside?
We prefer it serverside.
I could find a workaround with a bit of configuration:
$config = [
...
'components' => [
...
'users' => [
...
'enableAutoLogin': true,
'loginUrl' => ['/user/auth/external?authclient=MyAuthClient'],
]
]
];
If it could be achieved without coding, it should be in the readme.