We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi
I wanted to use your package. But I face an issue.
I tried to following to create a TOTP
// Generate the OTP const config = generateConfig({ period: 120, }); const secret = generateSecret(config.secretSize); const codes = Totp.generatePasscodes({ secret: secret }, config);
and the following to validate (of course with passcode and secret from above)
// Validate the OTP const config = generateConfig({ period: 120, }); const valid = Totp.validate({ passcode: '097991', secret: '2X4A3XCNPJJSHU4O' }, config);
This always results in false. When I remove the period: 120 in the config, it works. Any idea? Is there a limit for the period?
false
period: 120
The text was updated successfully, but these errors were encountered:
Hi, i recently saw a PR fixing this. Basically you should add config values on Totp.validate function. Example:
Totp.validate
PR im refering to: #152
Hope it helps!
Sorry, something went wrong.
No branches or pull requests
Hi
I wanted to use your package. But I face an issue.
I tried to following to create a TOTP
and the following to validate (of course with passcode and secret from above)
This always results in
false
. When I remove theperiod: 120
in the config, it works.Any idea? Is there a limit for the period?
The text was updated successfully, but these errors were encountered: