title: How to redirect keyclock to application's page and get token
body: <p>I am using keycloak's login and registration page. For login I use:</p>
  <pre><code> keycloak.init({onLoad: 'login-required'}).then(function (authenticated) {
          if (!authenticated) {
             
          } else{
  
          }
  </code></pre>
  <p>This works fine as I can use the code above to redirect to the application page with token received.  However, if the user clicks on registration link and register as a new user, I see browser redirected to  :</p>
  <pre><code>htttps://localhost/auth/realms/realm1/login-actions/registration?session_code=2TC4xBE5BoFy_Dt7nK8wNDzdLx-8rJmA7l0IjTY1Khk&amp;execution=2e64e3ef-185a-4ca8-a6cc-51c40f9fb7fc&amp;client_id=bizmapp&amp;tab_id=EbayK64spNk
  </code></pre>
  <p>I would like a  keycloak callback after registration where I can get the token and redirect the user to the application's  original secured page where the user wanted to go to before the login/registration</p>