SignInManager<TUser>.SignInAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SignInAsync(TUser, AuthenticationProperties, String) |
Signs in the specified |
SignInAsync(TUser, AuthenticationProperties, String) |
Signs in the specified |
SignInAsync(TUser, Boolean, String) |
Signs in the specified |
SignInAsync(TUser, AuthenticationProperties, String)
- Source:
- SignInManager.cs
- Source:
- SignInManager.cs
Signs in the specified user
.
public virtual System.Threading.Tasks.Task SignInAsync (TUser user, Microsoft.AspNetCore.Authentication.AuthenticationProperties authenticationProperties, string authenticationMethod = default);
public virtual System.Threading.Tasks.Task SignInAsync (TUser user, Microsoft.AspNetCore.Authentication.AuthenticationProperties authenticationProperties, string? authenticationMethod = default);
abstract member SignInAsync : 'User * Microsoft.AspNetCore.Authentication.AuthenticationProperties * string -> System.Threading.Tasks.Task
override this.SignInAsync : 'User * Microsoft.AspNetCore.Authentication.AuthenticationProperties * string -> System.Threading.Tasks.Task
Public Overridable Function SignInAsync (user As TUser, authenticationProperties As AuthenticationProperties, Optional authenticationMethod As String = Nothing) As Task
Parameters
- user
- TUser
The user to sign-in.
- authenticationProperties
- AuthenticationProperties
Properties applied to the login and authentication cookie.
- authenticationMethod
- String
Name of the method used to authenticate the user.
Returns
The task object representing the asynchronous operation.
Applies to
SignInAsync(TUser, AuthenticationProperties, String)
Signs in the specified user
.
public virtual System.Threading.Tasks.Task SignInAsync (TUser user, Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties authenticationProperties, string authenticationMethod = default);
abstract member SignInAsync : 'User * Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties * string -> System.Threading.Tasks.Task
override this.SignInAsync : 'User * Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties * string -> System.Threading.Tasks.Task
Public Overridable Function SignInAsync (user As TUser, authenticationProperties As AuthenticationProperties, Optional authenticationMethod As String = Nothing) As Task
Parameters
- user
- TUser
The user to sign-in.
- authenticationProperties
- AuthenticationProperties
Properties applied to the login and authentication cookie.
- authenticationMethod
- String
Name of the method used to authenticate the user.
Returns
The task object representing the asynchronous operation.
Applies to
SignInAsync(TUser, Boolean, String)
- Source:
- SignInManager.cs
- Source:
- SignInManager.cs
Signs in the specified user
.
public virtual System.Threading.Tasks.Task SignInAsync (TUser user, bool isPersistent, string authenticationMethod = default);
public virtual System.Threading.Tasks.Task SignInAsync (TUser user, bool isPersistent, string? authenticationMethod = default);
abstract member SignInAsync : 'User * bool * string -> System.Threading.Tasks.Task
override this.SignInAsync : 'User * bool * string -> System.Threading.Tasks.Task
Public Overridable Function SignInAsync (user As TUser, isPersistent As Boolean, Optional authenticationMethod As String = Nothing) As Task
Parameters
- user
- TUser
The user to sign-in.
- isPersistent
- Boolean
Flag indicating whether the sign-in cookie should persist after the browser is closed.
- authenticationMethod
- String
Name of the method used to authenticate the user.
Returns
The task object representing the asynchronous operation.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for