How to bypass keycloak login page

Hi Folks,
I have my own custom login page application is secured with keycloak, when I hit my application URL it will come to my static page shows username and password (I will put the username and password of keyclaok user which I have already created through admin consle) and when I click on the login submit button which redirects to Keycloak login page, actually we don’t want to show keycloak login page instead I wanted to login through API.

How to bypass keycloak login page ? Any keycloak API is available to login ?
is any other way to bypass the keycloak login page ?
My app is written in springboot.

can you help me here?

Why do you use a custom login page application? If you need this just to have your own design you can also use custom theme for the login page at keycloak. With OAuth2 it is required to perform login using login form in keycloak. Bypassing this would contradict the whole idea of OAuth.


@afa thanks, but what if we have already authenticated the user and they don’t want to enter the username and password for the second time.


If user is already authenticated against the same Keycloak and realm then it will be authenticated again without user credentials. That’s a design of SSO protocols (OIDC, SAML).

1 Like

@jangaraj thanks :grin:

so, it will ask for otp but not username and password