SignInAsync&SignOutAsync #56856
-
I do not understand the meaning of the HttpContext.SignInAsync and HttpContext.SignOutAsync methods. In what scenarios should I use them?How to use them? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
Beta Was this translation helpful? Give feedback.
-
You can follow these articles |
Beta Was this translation helpful? Give feedback.
Your understanding is partially correct, but there are some important distinctions to make:
SignInAsync in .NET:
SignInAsync is part of the ASP.NET Core Identity system. It does more than just create tokens. It actually signs in a user, creating an authentication cookie or other persistent authentication mechanism depending on your configuration.
Purpose of SignInAsync:
You're right that JWT (JSON Web Token) authentication doesn't use SignInAsync directly. However…