mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
stretch sync login token validity to 5 minutes #277
This commit is contained in:
parent
4d15628840
commit
030d12a465
@ -23,7 +23,8 @@ async function loginSync(req) {
|
||||
|
||||
const now = new Date();
|
||||
|
||||
if (Math.abs(timestamp.getTime() - now.getTime()) > 5000) {
|
||||
// login token is valid for 5 minutes
|
||||
if (Math.abs(timestamp.getTime() - now.getTime()) > 5 * 60 * 1000) {
|
||||
return [400, { message: 'Auth request time is out of sync' }];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user