SignInManager<TUser>.SignInAsync Method

Definition

Overloads

SignInAsync(TUser, AuthenticationProperties, String)

Signs in the specified user.

SignInAsync(TUser, AuthenticationProperties, String)

Signs in the specified user.

SignInAsync(TUser, Boolean, String)

Signs in the specified user.

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