UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>.FindByLoginAsync(String, String, CancellationToken) Method
Definition
Retrieves the user associated with the specified login provider and login provider key..
public virtual System.Threading.Tasks.Task<TUser> FindByLoginAsync (string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken = default);
abstract member FindByLoginAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'User (requires 'User :> Microsoft.AspNetCore.Identity.IdentityUser<'Key>)>
override this.FindByLoginAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'User (requires 'User :> Microsoft.AspNetCore.Identity.IdentityUser<'Key>)>
Public Overridable Function FindByLoginAsync (loginProvider As String, providerKey As String, Optional cancellationToken As CancellationToken = Nothing) 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.
- cancellationToken
- CancellationToken
The CancellationToken used to propagate notifications that the operation should be canceled.
Returns
- Task<TUser>
The Task for the asynchronous operation, containing the user, if any which matched the specified login provider and key.