Skip to content

Build your personal knowledge base with Trilium Notes

stretch sync login token validity to 5 minutes #277

azivner030d12a465e8
diff --git a/src/routes/api/login.js b/src/routes/api/login.js
index 9899ec1cc8..22bdd67e24 100644
--- a/src/routes/api/login.js
+++ b/src/routes/api/login.js
@@ -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' }];
}