oidc: log which app the user logged into

This commit is contained in:
Girish Ramakrishnan
2023-07-25 18:02:39 +05:30
parent b533e5273d
commit d9a9ae2add
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -531,7 +531,7 @@ function interactionLogin(provider) {
const [interactionFinishError, redirectTo] = await safe(provider.interactionResult(req, res, result));
if (interactionFinishError) return next(new HttpError(500, interactionFinishError));
await eventlog.add(user.ghost ? eventlog.ACTION_USER_LOGIN_GHOST : eventlog.ACTION_USER_LOGIN, auditSource, { userId: user.id, user: users.removePrivateFields(user) });
await eventlog.add(user.ghost ? eventlog.ACTION_USER_LOGIN_GHOST : eventlog.ACTION_USER_LOGIN, auditSource, { userId: user.id, user: users.removePrivateFields(user), appId: clientId });
if (!user.ghost) safe(users.notifyLoginLocation(user, ip, userAgent, auditSource), { debug });
// debug(`route interaction login post result redirectTo:${redirectTo}`);