Merge pull request #5606 from SharonZhu0122/fix-5604-oidc-session-cleanup

Expire abandoned OIDC mobile login sessions
This commit is contained in:
advplyr authored and GitHub committed 2026-09-29 16:51:30 -05:00
commit 86bc18487b
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
})
}
/**