在 C# 应用程序中设置 Google 身份验证器的问题

问题描述

请任何人帮助我解决此错误。我使用谷歌身份验证(v2.2.1)登录我的应用程序。但我需要一个不能加密密钥的条件(secretKey)。

TwoFactorAuthenticator tfA = new TwoFactorAuthenticator();
var setupCode = tfA.GenerateSetupCode(issuerName,appName,secretKey,true); // secretIsBase32
// setupCode.ManualEntryKey (CAPITALISED secretKey)

var result = tfA.ValidateTwoFactorPIN(secretKey,userInput)
bool value = result ? true : false;

我创建了基于 setupCode.ManualEntryKey 时间的 google 身份验证器应用程序,但它始终显示验证过程为 false。

但我已经用 secretIsBase32 (false) 测试过,它工作得很好。如何使用 secretIsBase32 (true)

修复此错误

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)