Home > Software engineering >  Keycloak: show custom page after log out in angular application
Keycloak: show custom page after log out in angular application

Time:06-22

I have an angular app, which uses 3 browser windows on 3 monitors. One is main window, others are secondary. For authentication and authorization I use Keycloak. Currently, after log out, the user is automatically logged out on all instances due/thanks to the silent ssh check and log in screen is shown. I need to achieve, that the log in screen is shown only on main screen ( I know which it is), and on the secondary screens, there is just some message shown in the app, that user should log in in the main screen first. Optionally the log in screens can be on all monitors/instances, but after log in on one of them, the others should auto log in also, and redirect to latest page before log out.

CodePudding user response:

Broadcast logout/login events (for example with Broadcast Channel API) and save/restore latest page in logout/login function.

  • Related