1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

Replace OtpSharp with Otp.NET for net core support

This commit is contained in:
Kyle Spearrin
2017-01-13 21:34:54 -05:00
parent 77e54f7c12
commit 1b30a27990
3 changed files with 6 additions and 8 deletions

View File

@ -6,11 +6,10 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Bit.Core.Domains;
using Bit.Core.Repositories;
using OtpSharp;
using Base32;
using System.Linq;
using Microsoft.AspNetCore.Builder;
using Bit.Core.Enums;
using OtpNet;
namespace Bit.Core.Services
{
@ -252,7 +251,7 @@ namespace Bit.Core.Services
{
case Enums.TwoFactorProviderType.Authenticator:
var key = KeyGeneration.GenerateRandomKey(20);
user.AuthenticatorKey = Base32Encoder.Encode(key);
user.AuthenticatorKey = Base32Encoding.ToString(key);
break;
default:
throw new ArgumentException(nameof(provider));