示例#1
0
        /// <inheritdoc />
        public override async Task <bool> GetTwoFactorEnabledAsync(BackOfficeIdentityUser user,
                                                                   CancellationToken cancellationToken = default(CancellationToken))
        {
            if (!int.TryParse(user.Id, NumberStyles.Integer, CultureInfo.InvariantCulture, out var intUserId))
            {
                return(await base.GetTwoFactorEnabledAsync(user, cancellationToken));
            }

            return(await _twoFactorLoginService.IsTwoFactorEnabledAsync(user.Key));
        }
示例#2
0
 /// <inheritdoc />
 public override async Task <bool> GetTwoFactorEnabledAsync(
     MemberIdentityUser user,
     CancellationToken cancellationToken = default) =>
 await _twoFactorLoginService.IsTwoFactorEnabledAsync(user.Key);