Expire abandoned OIDC mobile login sessions

This commit is contained in:
zsh committed 2026-09-25 17:38:37 +12:00
1 parent d22c468215
commit 273693e8ad
2 files changed
+28 -1

No files matched your search

+5 -1
View File
@@ -1,3 +1,4 @@
const { LRUCache } = require('lru-cache')
const { Request, Response } = require('express')
const passport = require('passport')
const OpenIDClient = require('openid-client')
@@ -15,7 +16,10 @@ class OidcAuthStrategy {
this.strategy = null
this.client = null
// Map of openId sessions indexed by oauth2 state-variable
this.openIdAuthSession = new Map()
this.openIdAuthSession = new LRUCache({
ttl: 10 * 60 * 1000,
ttlAutopurge: true
})
}
/**