I am using keycloak's login and registration page. For login I use:
keycloak.init({onLoad: 'login-required'}).then(function (authenticated) {
if (!authenticated) {
} else{
}
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 :
htttps://localhost/auth/realms/realm1/login-actions/registration?session_code=2TC4xBE5BoFy_Dt7nK8wNDzdLx-8rJmA7l0IjTY1Khk&execution=2e64e3ef-185a-4ca8-a6cc-51c40f9fb7fc&client_id=bizmapp&tab_id=EbayK64spNk
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