-
Notifications
You must be signed in to change notification settings - Fork 4k
Logout GET /connect/endsession?id_token_hint=xx call from angular app was cancelled #3854
Comments
Are you doing that in an iframe? |
No. Here's my client setting on Ids4:
Here's my configuration on Angular app:-
When user clicks on logout, invoke this signout() { I double checked id_token_hint. |
Is this using the new ASP.NET Core 3 template? Also, what do you see in the browser -- a blank screen, or does it redirect to the client post logout redirect uri? Finally, do you see anything odd in the IS logs? |
Yes Ids4 is running on ASP.NET Core 3. Here's packages: No black screen at all, clicking on logout creates a GET request to /connect/endsession?id_token_hint=xx and then loads back angular client app. This GET request was block is visible under chrome network logs, here all logs upon clicking logout: Here's the Ids4 log file: |
This #3593 issue looks similar, he missed to check browser's network log to see his GET request to endsession was actually blocked. He used MVC controller action in angular client for logout, which will not work if angular app is running outside .net and using 'ng serve'. I see similar issue few more places, like on https://www.scottbrady91.com/Angular/SPA-Authentiction-using-OpenID-Connect-Angular-CLI-and-oidc-client Is this because of updating projects to .NET Core 3.0 ? |
Not sure. I still don't know if you are using the template from ASP.NET Core 3 to use IdentnityServer of if you built it all from scratch. |
@brockallen today i downloaded latest Ids4 (https://github.com/IdentityServer/IdentityServer4/tree/master/samples/Quickstarts/3_AspNetCoreAndApis) and then using spa client (no .net assemblies in spa) and running it using Changes made in Ids4 for spa client :-
I still see exact same error, this is something related to Ids4 itself which blocks GET call. I zipped and uploaded this project here so that you can reproduce it. |
I found solution. It was angular which blocked/cancelled the request to end session on angular app. Here's the older code:
Here's the new code:
So, we need to use Reference: https://stackoverflow.com/questions/41458842/attaching-click-to-anchor-tag-in-angular2 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I have several applications built on .NET Framework and .NET Core, all works well with Ids4 (3.0.1). Now I added a new
angular (8.0.0)
app withoidc-client (^1.9.0)
in solution. In this app, login works fine but logout GET request to/connect/endsession?id_token_hint=xx
was cancelled.Chrome console error:-
Edge console error:
Other similar calls to Ids4 works well, here's screenshot:
I checked Ids4 log, it has nothing and even breakpoints was not hit on logout.
Do you faced similar issue ?
The text was updated successfully, but these errors were encountered: