双因素认证(2FA/TOTP)在 BitzOrcas 中尚未实现。计划作为认证系统的增强。
计划实现
流程
用户名 + 密码登录 │ ▼已启用 2FA?→ 否 → 签发 JWT → 完成 │ 是 │ ▼输入认证器应用中的 TOTP 码 │ ▼验证 TOTP → 签发 JWT → 完成TOTP 验证
// 计划中:基于时间的 OTP 验证public interface ITotpVerifier{ bool VerifyCode(string secret, string code); string GenerateSecret(); string GenerateQrCodeUri(string email, string secret);}恢复代码
当认证器不可用时的单次恢复代码,用于账户恢复。
配置(计划中)
{ "TwoFactor": { "Enabled": true, "Issuer": "BitzOrcas Platform", "CodeLength": 6, "CodeValiditySeconds": 30 }}另见
- 认证 — 当前 JWT/HMAC/API Key 系统