From 9b8cd29087e38efd5fef8f503a975412fa24bdcf Mon Sep 17 00:00:00 2001 From: Jonathan Date: Wed, 10 Jun 2020 12:07:30 +0200 Subject: [PATCH] Hyphenate documentation Hyphenate "two-factor authentication" in documentation. Add line break before return statements. --- .../Extensions.Core/src/AuthenticatorTokenProvider.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Identity/Extensions.Core/src/AuthenticatorTokenProvider.cs b/src/Identity/Extensions.Core/src/AuthenticatorTokenProvider.cs index f067e398c2..d40ec7f50f 100644 --- a/src/Identity/Extensions.Core/src/AuthenticatorTokenProvider.cs +++ b/src/Identity/Extensions.Core/src/AuthenticatorTokenProvider.cs @@ -13,14 +13,15 @@ namespace Microsoft.AspNetCore.Identity public class AuthenticatorTokenProvider : IUserTwoFactorTokenProvider where TUser : class { /// - /// Checks if a two factor authentication token can be generated for the specified . + /// Checks if a two-factor authentication token can be generated for the specified . /// /// The to retrieve the from. - /// The to check for the possibility of generating a two factor authentication token. + /// The to check for the possibility of generating a two-factor authentication token. /// True if the user has an authenticator key set, otherwise false. public async virtual Task CanGenerateTwoFactorTokenAsync(UserManager manager, TUser user) { var key = await manager.GetAuthenticatorKeyAsync(user); + return !string.IsNullOrWhiteSpace(key); } @@ -65,6 +66,7 @@ namespace Microsoft.AspNetCore.Identity return true; } } + return false; } }