passport-2fa-totp
passport-2fa-totp copied to clipboard
TOTP based Two-Factor Authentication for Passport and Node.js
This closes #2
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 {...
https://github.com/ilich/passport-2fa-totp/blob/master/lib/strategy.js#L96 It seems that `skipTotpVerification` to `true` doesn't actually skip the verification; the code will continue to execute past the if block linked above and will attempt to set the...
Pretty sure there's an L missing here in "Google": 
I've added the option to bypass, returning the same value as if the 'skipTotpVerification' flag had been set. If the user does not have a secret, it will continue, otherwise...
I understand this hasn't been updated for a while, but I am wondering if there is a mechinism in place for it to fallback to local authentication only (no 2fa)...
`self.success()` doesn't interrupt script execution, and this leads to further checks of OTP code and `Can't set headers after they are sent` errors.