'Can not access ClaimsPlrincipal User on IdentityServer in .NET Core

I am creating a web service on the IdentityServer.

And I would like to change paths of management pages that was generated item by editor.

But if I change the paths starting with /Identity, I can not access ClaimsPlrincipal user object.

Even though I logged in to my web service, I did not get user information from ClaimsPrincipal user.

But if I use the default paths starting with /Identity, it works well.

What is the problem?

I guess the problem is a cookie path.

As far as I know, the token of information who logged in was saved as a cookie.

Therefore I thought the path of cookie that have a token of user information was set to default management path started with /Identity.

Does anyone know how to solve this problem?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source