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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user