共用方式為


IUserLoginStore<TUser>.AddLoginAsync 方法

定義

將外部 UserLoginInfo 新增至指定的 user

public:
 System::Threading::Tasks::Task ^ AddLoginAsync(TUser user, Microsoft::AspNetCore::Identity::UserLoginInfo ^ login, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task AddLoginAsync (TUser user, Microsoft.AspNetCore.Identity.UserLoginInfo login, System.Threading.CancellationToken cancellationToken);
abstract member AddLoginAsync : 'User * Microsoft.AspNetCore.Identity.UserLoginInfo * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function AddLoginAsync (user As TUser, login As UserLoginInfo, cancellationToken As CancellationToken) As Task

參數

user
TUser

要新增登入的使用者。

login
UserLoginInfo

要加入至指定 user 之 的外部 UserLoginInfo

cancellationToken
CancellationToken

用於散佈應取消作業通知的 CancellationToken

傳回

表示非同步作業的 Task

適用於