In ASP.NET Core, what the best option to store the value after login successful?

Jerry Lipan 916 Reputation points
2022-02-07T14:17:02.257+00:00

Hi,

In ASP.NET Core, what the best option to store the value after login successful?

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

2 additional answers

Sort by: Most helpful
  1. Michael Taylor 41,111 Reputation points
    2022-02-07T15:52:21.727+00:00

    What value? Please provide more information.

    If the data is associated with the login in user account then add it as a claim on the user's token.
    If it is cached data about the user then consider storing it either in a cookie (if you want cookies and it is not sensitive) or perhaps in memory using MemoryCache or out of process using a database.

  2. Jerry Lipan 916 Reputation points
    2022-02-08T03:18:15.253+00:00

    Hi @Michael Taylor ,

    I want to store Token value. Store this token until user logout