the oidc module expect accountId and sub to be the same

in our case sub is the username exposed to the app, not the userId
internal to Cloudron

Upstream behavior change https://github.com/panva/node-oidc-provider/commit/9b89153c0ea2f2280a26e35f3b66d1900aed7c79
This commit is contained in:
Johannes Zellner
2025-07-01 22:07:31 +02:00
parent b2d380afcc
commit 846986987d
3 changed files with 27 additions and 19 deletions
+1 -1
View File
@@ -236,7 +236,7 @@ async function setNotificationConfig(req, res, next) {
async function destroyUserSession(req, res, next) {
assert.strictEqual(typeof req.user, 'object');
const [error] = await safe(oidcServer.revokeByUserId(req.user.id));
const [error] = await safe(oidcServer.revokeByUsername(req.user.username));
if (error) return next(BoxError.toHttpError(error));
await safe(tokens.del(req.token.id));