How to skip the Yii login page and redirect to the OpenID Connect provider login page?

Hi. I have configured a OIDC provider and I just need this user source. To make the interface less confusing I would like to skip the regular login/password authentication page, and directly redirect to the identity provider authentication page.

Is there a setting to do this?

Thank you for your help

you can do It in many ways.

For example you can use:

  • a global event;
  • a beforeAction controller method;
  • a simple check (if/else)l in your login method;

I personally prefer to use a global event as for clean architecture and no boilerplate into the controller.

Check here for some infos:

Thank you for your answer. I am totally new to yii so this is not clear to me how to use those concepts in my OpenIDConnect client.
I am surprised this usecase is not documented as it feels like a very common one to me.

Would you have further clues to share on how to automatically redirect the login page to the OIDC provider login page?