Skip to content

SignInAsync&SignOutAsync #56856

Closed Answered by ParsaMehdipour
paxhujing asked this question in Q&A
Jul 17, 2024 · 2 comments · 6 replies
Discussion options

You must be logged in to vote

Your understanding is partially correct, but there are some important distinctions to make:

  1. 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.

  2. Purpose of SignInAsync:

  • It establishes the user's identity for the current session.
  • It can create an authentication cookie that persists the user's identity across requests.
  • It handles things like remember-me functionality.
  1. JWT Authentication:
    You're right that JWT (JSON Web Token) authentication doesn't use SignInAsync directly. However…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@paxhujing
Comment options

@ParsaMehdipour
Comment options

Answer selected by paxhujing
@armintodev
Comment options

@paxhujing
Comment options

@ParsaMehdipour
Comment options

@armintodev
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants