Cannot redirect to other website

I implemented a kibana plugin to protect kibana. When a user tries to access kibana and the user hasn't been authenticated, then the browser is redirected to our Identify provider to do authentication, and then redirect back to kibana when the authentication finishes.

The above logic is working well on the first login. But it doesn't work when the session is timeout. When the session is timeout, the browser is supposed to be redirected to the Identify provider as well. But it doesn't work. I tried the following approaches, neither of them work.

  1. In the kibana plugin, just use reply.redirect(IdPURL). It doesn't work due to CORS issue.
  2. I tried to just send back a script back to the browser using reply(" < script > window.location.href=xxxx"< /script > "), but it doesn't work either. It seems that kibana doesn't process the script on client side.

Any suggestions? Thanks.

Maybe this answer helps with the CORS issue?

@Bill_McConaghy thanks for the info. I have already resolved the issue. I added an intercept, and it works.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.