Session Management

Mendenzon Tatis Rosario 20 Reputation points
2024-04-03T23:03:28.9366667+00:00

I am currently in the middle of setting up my user session management using ASP.NetCore Web API. I am able to register users and log in successfully. After checking my Dev Tools on Chrome I can see that a JWT token is created and added to the cookie with the proper parameters. However, I'm not understanding where my disconnect is happening because the cookie is not authenticating the user to remain in the session. As soon as I move to another page of my app my getCurrent triggers but does not return the user that just logged in and the claims return null with no identity available. Screenshot 2024-04-03 at 2.50.49 PM

Screenshot 2024-04-03 at 2.51.16 PM

Screenshot 2024-04-03 at 2.51.48 PM

Screenshot 2024-04-03 at 2.53.21 PM

Screenshot 2024-04-03 at 2.53.43 PMScreenshot 2024-04-03 at 2.55.02 PM

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,156 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 55,601 Reputation points
    2024-04-05T17:38:18.22+00:00

    it looks like your signing in with a jwt token. these are not written to a cookie, but should be sent as a bearer token on each request. browsers only support bearer tokens via javascript requests that pass the token.

    note: the identity cookie value is encrypted, and can not be decoded in the browser tools. also identity does not use session

    0 comments No comments