using System.Threading.Tasks; using BTCPayServer.Data; using Microsoft.AspNetCore.Identity; namespace BTCPayServer.Security; public class DisabledEmailTokenProvider : EmailTokenProvider { public override Task CanGenerateTwoFactorTokenAsync(UserManager manager, ApplicationUser user) { // We currently don't allow the user of email as two-factor authentication, // so we don't need to generate a token return Task.FromResult(false); } }