When does the Identity Provider Redirector skip the Keycloak login form?
A team that already brokers Microsoft Entra ID or Google into Keycloak usually wants users to land on that provider's sign-in page directly, without first seeing the Keycloak login form with a list of buttons. Keycloak offers two ways to do this. The Identity Provider Redirector is an authenticator in the browser flow that Keycloak runs before it shows the login form. It can forward every user to one configured provider by default, or it can read a kc_idp_hint value and forward only when that value matches an identity provider alias in the realm. The Keycloak server administration guide describes both behaviors and is the reference to check against the Keycloak version you deploy.
The choice comes down to who decides which provider a user sees. A realm-wide default fits a workforce realm where almost every user belongs to one directory, so the redirector can be set to send everyone to that provider and the login form is skipped for them. A client-supplied kc_idp_hint fits a realm where several providers coexist and each application already knows which one its users need. The application adds the hint to the authorization request, and Keycloak routes the user accordingly. Because the hint comes from the client, it is a routing preference and not an access control, so the decision about who may sign in through which provider still belongs to the realm's authentication and identity provider settings.
Before you rely on either mechanism, confirm three things in your own environment: which browser flow your realm uses and where the redirector sits in it, which identity provider aliases your applications will send, and what a user sees when the chosen provider is unavailable. The fallback behavior is the risk most teams underestimate, because a forced redirect leaves no login form for a user to fall back on. Test that path in a non-production realm before you make the redirect the default for production users.
Which redirector and hint options fit which login design
This table compares four ways to route users past the Keycloak login form: a default identity provider, hiding providers, a client-supplied kc_idp_hint, and keeping the form visible. Read each row for what changes for users, what changes for applications, and the main risk to plan for before enabling it.
| Option | What changes for users | What changes for applications | Main risk |
|---|---|---|---|
| Default provider via the Identity Provider Redirector | Users who open the Keycloak login URL are sent straight to one upstream provider without seeing the form | Applications need no code change and keep their normal Keycloak client settings | Local account holders and break-glass admins can get stuck at the upstream provider if it is down |
| Hide providers from the login page | Other providers disappear from the buttons list, but the form may remain visible | No change to client configuration; the provider still works when reached another way | Users cannot see that a provider exists, so support requests increase unless the sign-in path is documented |
| Client-supplied kc_idp_hint | Only users who arrive from an application that sends the hint skip the form | Each client must add the hint parameter to its authorization request and be kept in step with provider aliases | A missing or misspelled alias silently falls back to the normal login page, which can confuse testers |
| Keep the login form visible | Users see every enabled provider and the local username and password fields | No routing changes; applications behave as they did before the redirector was added | Users may pick the wrong provider, and local credentials stay a standing attack surface |
| Redirector plus a local login escape route | Normal users go straight to the provider, while a separate URL or hint still reaches the form | Applications using the default route need a documented way to request the local form | The escape route itself must be protected, monitored and tested, or it becomes the weakest sign-in path |
How to configure the redirector in a realm
This sequence takes a working upstream identity provider from a test realm to a production realm where users land on the provider's sign-in page directly, with a tested way back to the Keycloak login form if the provider fails.
Confirm the provider works in a test realm
Before touching production, create or pick a test realm and configure the identity provider there with its alias, client registration and mappers. Sign in once through the Keycloak login form and select the provider from the page. Confirm that the user is created or linked, that the expected claims or attributes arrive, and that the account can reach the target client. Record the provider alias exactly as you typed it, because the redirector and any kc_idp_hint value must match it character for character.
Set the provider as the default redirect target
In the realm's authentication flow used by the browser flow, configure the Identity Provider Redirector execution and set its default identity provider to the alias you confirmed. Keep the flow bound to the clients that should use it, and avoid changing the shared browser flow for every client in the realm unless that is intended. Check that the change saved by reloading the flow configuration. The check is a fresh browser session that opens the client's login URL and lands on the provider's sign-in page without showing the Keycloak username and password form.
Decide which providers stay visible
Review every other identity provider on the realm and decide whether it should still appear on the Keycloak login page. Providers that must remain available for fallback, break-glass access or a second population of users should stay visible. Providers that should only be reached through the redirect or through a client-supplied hint can be hidden from the login page in the provider settings. Document the decision for each alias, since a hidden provider is still usable through kc_idp_hint and this is a common surprise during review. The check is that the login page shows only the providers you intended.
Configure the client to send kc_idp_hint if needed
If the application should choose the provider per request, for example from a tenant or domain the user typed, configure the client's authorization request to include the kc_idp_hint parameter with the provider alias. Ask the application team to confirm where the value comes from and to validate it against an allowlist, so that arbitrary input cannot select an unexpected provider. Review how the hint interacts with the default redirect: the hint is evaluated for the request in which it appears. The check is a request captured in the browser developer tools showing the parameter, and a successful sign-in that lands on the hinted provider.
Test the success path with a private session
Sign out fully, open a private browser window with no existing Keycloak session, and start sign-in from the application. Confirm that the user is sent to the intended provider, completes its sign-in and returns to the application. Then inspect the token claims for the expected issuer and check the realm's user event log for a login event that names the same identity provider alias. A mismatch between the alias in the events and the alias you configured usually means a second provider or a stale hint is in use.
Test the back-out path before go-live
Rehearse the case where the provider is unavailable or misconfigured. Temporarily disable the default redirect in the test realm, or use a test account whose provider sign-in you can deliberately break, and confirm that the Keycloak login form returns with the visible providers and any local accounts you chose to keep. Confirm who can reverse the change and how quickly it can be made in your change process. Keep at least one administrative path that does not depend on the redirected provider, and verify it before production changes. The check is a successful sign-in through the fallback path, recorded in the events log.
Apply to production and confirm the event trail
Repeat the configuration in the production realm using the same alias and flow settings, then run the success and back-out tests again with a small set of named test accounts. Watch the admin and user event logs during the first real sign-ins to confirm the expected provider alias appears and that no sign-ins fall through to the Keycloak form unexpectedly. Keep a written record of the flow change, hidden providers and client changes so the configuration can be reviewed or reverted later. The check is a clean event trail for the first sign-ins with no unplanned provider.
Security risks when login skips the form
Sending users straight to a provider removes the login form that normally shows which identity source is in use and who can reach the admin path. The six risks below share one root cause: the browser, not the user, now chooses the provider, so each card names a setting to verify before go-live.
Client-supplied hints choose the provider
The kc_idp_hint parameter is set by the client application in the authorization request, so anyone who can alter that URL can point a login at a provider the application should not accept. Check that every client's redirect and hint values come from a fixed list, and that the provider you expect is the only one a given client can reach. Review each client's configuration, not only the realm's provider list.
Less visibility into the sign-in path
When the login form is skipped, users no longer see a choice of providers, so support staff and users may not know which identity source handled a sign-in. Confirm that the provider alias appears in your event records and in the token or session data your applications read, so troubleshooting does not depend on guessing.
Admin access if the form is hidden
If the default provider sends every user away from the Keycloak login page, administrators may have no visible path to the admin console. Keep a local administrator route that does not depend on the external provider, and confirm that the admin console and Administration REST API sit on a separate hostname or context path from public frontend URLs.
Production guideAccount linking on first login
On first login through a provider, Keycloak may link the external identity to an existing local account, and a loose match on email can attach a stranger's identity to an existing user. Review each provider's first-login flow and confirm that linking requires verified email or an explicit confirmation step before it happens.
Logout when the provider stays signed in
A user who logs out of Keycloak may still hold an active session at the upstream provider, so the next redirect signs them back in without a prompt. Test logout end to end with each provider, and confirm that backchannel logout tokens from external providers are validated, which the 26.8 upgrade notes now require.
Audit trail of redirected logins
Redirected logins still create Keycloak events, but without a login form the record may not show the provider a user chose or the hint a client sent. Enable login event storage, confirm that failures are recorded in the database, and check that your retention meets your own audit policy before you rely on those records.
What users see when the upstream identity provider is down
A redirector sends users to one identity provider without showing them the Keycloak login form, so an outage at that provider can leave them with a browser error and no visible way forward. The point of this section is to decide, before go-live, what users see in that case and who can still sign in. Keycloak does not decide this for you. The behavior when an upstream provider is unreachable depends on the provider, the network path, the protocol and the timeouts in your environment, so treat the failure mode as something to test, not something to assume.
Plan three fallbacks. First, keep the login form reachable on purpose. If the redirector is set as the default provider, check whether a user can still reach the standard form, for example by adding a parameter that skips the redirect or by making sure the local login path is still enabled for the realm. Second, define a break-glass local admin path: a local account, held outside the federated directory, with strong authentication and a documented procedure for when it may be used. Confirm which realm and which admin roles it covers, and keep its credentials stored where the upstream outage cannot lock you out. Third, decide how users learn about the outage. A static notice on the application's sign-in page or a status page is often the only channel that still works when the provider is down, so agree who publishes it and how it is removed.
Limits to confirm before you rely on the redirector
The redirector and kc_idp_hint look simple on a single realm with one provider. The behavior changes once a realm holds several providers, organizations, multiple client flows, or a Red Hat build in place of the upstream release. Test each of these in your own environment before users depend on automatic routing.
Multiple providers in one realm
Ask what the redirector does when a realm has several identity providers and one is set as the default. Confirm whether a hint can select a provider that is hidden from the login page, and whether a disabled provider is still reachable by alias. Test with at least two providers and a user whose account exists in each, so you can see which provider wins and whether the login form still appears.
Keycloak docsOrganizations and per-tenant providers
Confirm how the redirector interacts with the Organizations feature. If each member organization has its own identity provider, check whether the redirector chooses a provider by user domain, by organization, or not at all. Test a user from each domain, including an email address that matches no organization, and record which login page or provider they reach.
Hint support in each client flow
Check that kc_idp_hint is honored by every flow your applications use: the authorization code flow in web apps, the flow used by single-page and mobile clients, and any login started from a logout or account page. Some client types may ignore the parameter or pass it through differently. Run a login from each application and confirm the expected provider opens.
Behavior across upgrades
Read the upgrade notes for each target version before moving a realm that depends on the redirector. Confirm that the default provider setting, hidden-provider behavior and hint handling are unchanged, and retest after each minor upgrade. Keep a short regression script that starts a login with and without a hint, so a change shows up before users see it.
Upgrade guideRed Hat build versus upstream
If you run the Red Hat build of Keycloak, confirm with Red Hat that the redirector and hint behave as the upstream release documents, and note the product version you deploy. The build can lag the upstream release, so the features and fixes you read about may not match your version. Test the exact build in staging rather than assuming upstream behavior carries over.
Red Hat product pageHow a login request reaches the upstream provider
The flow starts when the application sends its authorization request to Keycloak's authorization endpoint. Keycloak then checks for a kc_idp_hint parameter from the client; if none is present, it applies the default provider set by the Identity Provider Redirector, and only when neither applies does the user reach the login form. The redirect to the upstream provider and the callback back to Keycloak are where most failures show up, so check that the provider's redirect URI matches Keycloak's broker endpoint exactly. Keycloak issues its own token to the application after the brokered login completes.
Provider selection order and the fallback to the login form.
Questions teams ask before configuring the redirector
How much more effort is a single-provider redirect than a multi-provider design?
A single-provider redirect is usually the smaller job, because Keycloak only needs one identity provider configured, one default or hinted route, and one set of login tests. A multi-provider design adds work for each additional provider: its own client registration and trust settings, claim or attribute mappers, a routing rule that decides which provider a user sees, and a test path for each combination of application and provider. The effort grows with the number of routing decisions rather than with the number of users. Ask the partner to count providers, applications and routing rules separately in the scope, since those three numbers drive most of the difference.
What does the work need from our application team and our identity team?
The identity team owns the realm, the upstream provider configuration, the trust relationship with the provider, and the decision about which users may skip the login form. The application team owns the client registrations, the redirect URIs, and any code that adds the kc_idp_hint parameter to authorization requests. Both teams need to agree on how a user is routed when the provider is unavailable, because that decision affects support and security. Expect a planning session, a named owner for each provider and application, and access to a non-production realm where routing changes can be tested before they reach users.
Can an internal team configure the redirector without outside help?
An internal team with Keycloak administration experience and access to the upstream provider's administrator can usually configure a single default provider without outside help. The harder parts are the ones teams tend to underestimate: client-side hint handling, verifying that the login page still works for local accounts, and testing the fallback when the provider is down. Outside help is most useful when several providers, several applications and a compliance review are involved, or when the team has no one who has tested a provider outage. Whatever the choice, ask whether the design, the test plan and the runbook will be written down, because that record is what the next administrator will rely on.
How long does testing usually take as applications and providers increase?
Testing time grows with the product of applications and providers, because each application needs checks for each provider path, plus the fallback path, plus any user who is linked to more than one identity. A single application with one provider mostly needs sign-in, sign-out, first-login and failure tests. Adding applications multiplies those checks, and adding providers adds mapping and account-linking cases on top. No duration is given here because it depends on how many routes exist and how much of the test is automated. Ask the partner for the test matrix in the written scope and for the number of environments it will run in.
What drives the cost of this work up?
The main cost drivers are the number of identity providers and applications, the number of routing rules, how many user populations must be handled differently, and whether the upstream provider needs its own configuration work on the provider side. Cost also rises when the fallback behavior must be designed and tested, when the environment has no staging realm, or when a compliance team wants evidence of the test results. Cost is partly one-time (design, build, testing and documentation) and partly recurring (reviews after provider changes, Keycloak upgrades and retesting). Ask which of these items are included in the fixed scope and which would be billed as change requests.
What should we ask for in a written quote?
A written quote should list the providers and applications in scope, the routing rules, the environments used for testing, and the fallback design. It should name the deliverables, such as the realm configuration export, the runbook for provider outages, the test results and the handover session. Ask which items the partner expects you to supply, such as provider administrator access, test accounts and application owners, and what happens if those are late. Also ask how changes after sign-off are priced, how retesting is handled after a Keycloak upgrade, and whether ongoing support is offered as a separate retainer. DeployOpen issues quotes from the written scope rather than from a published price list.
Does a redirect to the provider weaken our login controls?
A redirect itself does not weaken controls, but it moves the decision about strength of sign-in to the upstream provider. Before skipping the Keycloak login page, confirm that the provider enforces the multi-factor and session rules your policy requires, that Keycloak still validates the returned tokens, and that users who should not sign in through that provider are blocked. Teams in regulated sectors often document this as an access control decision and test it as part of their review. The security review can be scoped alongside the configuration so that the evidence is produced at the same time.
How DeployOpen scopes and delivers redirector configuration
DeployOpen plans, implements, tests and documents the Identity Provider Redirector and kc_idp_hint behavior inside your own Keycloak deployment. The work is agreed in a written, fixed scope, so your security, identity and application teams know exactly which login paths change and how each one is verified.
How we scope
- We list every realm, browser flow and client that will skip the login page, and which provider each one should reach.
- We record the fallback behavior for each provider when it is unreachable, so the decision is written down before any change.
- We agree in writing which login options stay visible, including local accounts and break-glass access for administrators.
How we build
- We configure the redirector as the default provider in the browser flow, with the provider aliases your scope names.
- We hide or show providers on the login page and set up client-supplied kc_idp_hint handling for the applications that send it.
- We test sign-in paths for each client, including logout, expired sessions and a provider outage, and record the results.
How we hand over
- We document the flow configuration, client settings and provider aliases so your team can review and reproduce them.
- We walk your administrators through the fallback procedure and how to remove the redirector if a provider must be retired.
- We provide the test evidence your security and compliance reviewers can examine alongside the configuration.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, so redirector behavior is rechecked after changes.
- We review the flow again when you add a provider, change a client or move to a new Keycloak release.
- Ask for the support scope, response arrangements and retest terms in the written quote before work begins.

