mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 20:07:33 -07:00
Allow wider window for totp verification (#5811)
As server time and client time may not necessarily match
This commit is contained in:
parent
faed098b4b
commit
d60f549aef
1 changed files with 2 additions and 1 deletions
|
@ -89,7 +89,8 @@ export default async (ctx: Koa.Context) => {
|
||||||
const verified = (speakeasy as any).totp.verify({
|
const verified = (speakeasy as any).totp.verify({
|
||||||
secret: profile.twoFactorSecret,
|
secret: profile.twoFactorSecret,
|
||||||
encoding: 'base32',
|
encoding: 'base32',
|
||||||
token: token
|
token: token,
|
||||||
|
window: 2
|
||||||
});
|
});
|
||||||
|
|
||||||
if (verified) {
|
if (verified) {
|
||||||
|
|
Loading…
Reference in a new issue