Delen via


UserManager<TUser>.FindByLoginAsync(String, String) Method

Definition

Retrieves the user associated with the specified external login provider and login provider key.

public:
 virtual System::Threading::Tasks::Task<TUser> ^ FindByLoginAsync(System::String ^ loginProvider, System::String ^ providerKey);
public virtual System.Threading.Tasks.Task<TUser> FindByLoginAsync (string loginProvider, string providerKey);
public virtual System.Threading.Tasks.Task<TUser?> FindByLoginAsync (string loginProvider, string providerKey);
abstract member FindByLoginAsync : string * string -> System.Threading.Tasks.Task<'User (requires 'User : null)>
override this.FindByLoginAsync : string * string -> System.Threading.Tasks.Task<'User (requires 'User : null)>
Public Overridable Function FindByLoginAsync (loginProvider As String, providerKey As String) As Task(Of TUser)

Parameters

loginProvider
String

The login provider who provided the providerKey.

providerKey
String

The key provided by the loginProvider to identify a user.

Returns

Task<TUser>

The Task for the asynchronous operation, containing the user, if any which matched the specified login provider and key.

Applies to