-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
on local, it works well but on live server, it always failed.
const randomBuffer = crypto.randomBytes(10); // 80 bits
const encoder = new base32.Encoder();
const secret = encoder.write(randomBuffer).finalize();
const { verificationCode, totpSecret } = req.body;
const decodedSecret = new base32.Decoder().write(totpSecret).finalize();
const verified = notp.totp.verify(verificationCode, decodedSecret, { window: 1 });
Can you help me???
Metadata
Metadata
Assignees
Labels
No labels