Forced reauthentication and routing the user automatically to the IdP with HRD

Problem statement

How to send the user automatically to the IdP login bypassing the login page and forcing the reauthentication?

Cause

  • If you just specify login_hint (and other required parameters): desired behavior
  • If you specify login_hint and prompt=login: home realm discovery breaks – the user gets their email in the username field, and they’re prompted for a password.
  • If you specify login_hint and max_age=0: desired behavior

Solution

So, if you need a forced reauthentication with a login_hint and home realm discovery, use max_age only.