passport-2fa-totp
passport-2fa-totp copied to clipboard
Error thrown when calling self._verifyTotpCode(req, user, verify)
Error reported is: self._verifyTotpCode is not a function
in strategy.js when using passport v0.6.0
To overcome this I have modified the code from line 117 in strategy.js:
try { if (self._passReqToCallback) { // g-humphries Nov-2022: added this test due to error thrown when creating a user // saying self._verifyTotpCode is not a function if (!self._skipTotpVerification) self._verifyTotpCode(req, user, verify); } else { self._verifyTotpCode(user, verify); } } catch (err) { self.error(err); }