Open green13 opened 8 years ago
The window
parameter determines how many key periods are permitted, i.e. if you set it to 1, the code will allow the current code and the previous one. By default the window
parameter is set to 4.
The other factor that effects this is the key period, normally this is 30 seconds, however you set this as part of calling the done
:
return done( null, base32.decode( key ), 30 );
Hello In two-factor example, code generated with Google Authenticator lifetime is 4 minutes. If set option
passport.use(new TotpStrategy({window: 1}, ...
lifetime will be two minutes. How to set the lifetime of one minute?