title: How do I customize Keycloak (Broker) OpenID connect endpoint callback from 3rd party IdP?
body: <p>I am using Keycloak as a broker with OIDC, connecting to 3rd party IdP. Client app (Welcome page) calls Keycloak, then Keycloak redirects to Idp login page. We have a following requirement:</p>
  
  <p>1) User1 bookmarks Idp Login page. User1 logs in using IdP login page. On successful authentication IdP calls iodc endpoint and Keycloak redirects User1 to client app.</p>
  
  <p>2) User1 closes browser without signing out</p>
  
  <p>3) User2 opens a new browser using bookmarked page, enters credentials and on successful authentication calls back Keycloak.</p>
  
  <p>At this point, I want to kill User1's active session and allow User2 without showing any error at Keycloak side (As if User1 was signed out and User2 logs in). Keycloak should redirect User2 to client app.</p>
  
  <p>Please suggest if this can be done using SPI?</p>
  
  <p>Thanks in advance.</p>