UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken>.FindByLoginAsync 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.
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.EntityFrameworkCore.IdentityUser<'Key, 'UserClaim, 'UserRole, 'UserLogin>)>
override this.FindByLoginAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'User (requires 'User :> Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<'Key, 'UserClaim, 'UserRole, 'UserLogin>)>
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
The Task for the asynchronous operation, containing the user, if any which matched the specified login provider and key.