balteo
December 17, 2021, 8:27am
1
Hello
I am trying to logout from Keycloak from a SPA angular application. I noticed that when I call Keycloak.js 's logout method from my SPA, I get a cancelled request as seen in the screen capture.
Chrome also says:
Provisional headers are shown
However, when I copy and paste the logout URL manually into a separate Chrome tab, then the logout is performed correctly.
What I am getting wrong?
balteo
December 23, 2021, 9:35am
2
I finally managed to find out why the request was canceled by chrome.
I had the following link:
<a href="" (click)="logout()">logout from private</a>
My angular (click)=" event was canceled by the href="" event.
By replacing the code above with this:
<a (click)="logout()">logout from private</a>
…the request is no longer canceled.