Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keycloak-Angular - Redirect to "Confirm Logout" page when logging out after a page refresh

When utilizing this.keycloak.logout() when i am using identity Provider IDP , it redirects to a confirmation page. I want to directly get redirected to login page and the session is ended. The thing is when i don't confirm, it doesn't delete the session from the keyloak dashboard.

like image 841
Azzouz Mohamed Avatar asked Jan 25 '26 11:01

Azzouz Mohamed


1 Answers

You do not need to write an extra code. ‘keycloak.logout’ only requests the redirectUri string. Just do it as follows.

  public logout() {
    this.keycloak.logout('http://localhost:4200/home');
  }
like image 192
Mr Outis Avatar answered Jan 26 '26 23:01

Mr Outis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!