getanthill 安全层
开始
首先,你需要安装软件包:
npm install -S @getanthill/sec
然后,你的客户可以跟随步骤 注册或签入 然后激活 MFA 验证.
// 1. Signin part:
const tokens = auth.getTokens(email, password);
// 2. MFA Setup part: (only on registration)
// Master key generation #keep-it-secret-keep-it-safe
const masterKey = otp.generateMasterKey();
// Secret key generation from Master key
const secretKey = otp.generateSecretFromMaster(masterKey);
// Validate MFA:
const isValid = otp.verify('123456', secretKey);
// Create the store:
const store = new Store(tokens.encryption, secretKey);
// Manage your data as always:
store.data = { hello: 'world' }; // Always encrypted data
路线图
- 默认执行此处描述的数据隐私安全层 : https://hacks.mozilla.org/2018/11/firefox-sync-privacy/ 页面存档备份,存于互联网档案馆
- 执行 TOTP
- 执行 QRCode 生成部分