/// <inheritdoc/> public Task <IFactor> AddFactorAsync(string userId, AddTotpFactorOptions totpFactorOptions, CancellationToken cancellationToken = default(CancellationToken)) { if (totpFactorOptions == null) { throw new ArgumentNullException(nameof(totpFactorOptions)); } if (totpFactorOptions.Provider == null) { throw new ArgumentNullException(nameof(totpFactorOptions.Provider)); } var factor = new TotpFactor { FactorType = FactorType.TokenSoftwareTotp, Provider = totpFactorOptions.Provider }; return(AddFactorAsync(factor, userId, cancellationToken: cancellationToken)); }
public Task <IFactor> AddFactorAsync(AddTotpFactorOptions totpFactorOptions, CancellationToken cancellationToken = default(CancellationToken)) => GetClient().UserFactors.AddFactorAsync(Id, totpFactorOptions, cancellationToken);