-
Notifications
You must be signed in to change notification settings - Fork 232
Open
Description
const appName = process.env.TOTP_APP_NAME;
const label = req.user ? req.user.email : 'user';
const { base32 }= speakeasy.generateSecret({
length: 20,
name: ${appName}:${label},
issuer: appName
});
.....
const { verificationCode, totpSecret } = req.body;
const verified = speakeasy.totp.verify({
secret: totpSecret,
encoding: 'base32',
token: verificationCode,
window: 1
});
it works well on local but when deploy to vps(ubuntu) don't works, it returns always false.
so i checked time of vps. but it is correct.
and secret same verificationCode.
Metadata
Metadata
Assignees
Labels
No labels