Redirect to keycloak on button click using Angular

I am integrating keycloak with Angular 8. I have a “home” page and a button in it. I need the application to redirect to keycloak login page when I am clicking on that button because, I need to show the “home” page at startup and dont want to show keycloak login page first. Can anyone suggest a solution for this?

Check and the difference between check-sso and login-required. You will need the check-sso option which allowed you to check if you authenticated but will not necessarily redirect you.

See: Angular, OpenID Connect and Keycloak

Yes, that works! Thank you for the suggestion.