UserOnlyStore<TUser,TContext,TKey,TUserClaim,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 override System.Threading.Tasks.Task<TUser> FindByLoginAsync (string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken = default);
public override System.Threading.Tasks.Task<TUser?> FindByLoginAsync (string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken = default);
override this.FindByLoginAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'User (requires 'User :> Microsoft.AspNetCore.Identity.IdentityUser<'Key>)>
Public Overrides 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.