diff --git a/src/pages/api/auth/login.ts b/src/pages/api/auth/login.ts index e1007b3c..00cb09d1 100644 --- a/src/pages/api/auth/login.ts +++ b/src/pages/api/auth/login.ts @@ -16,6 +16,7 @@ import { import { getUserByUsername } from 'queries'; import * as yup from 'yup'; import { ROLES } from 'lib/constants'; +import { getIpAddress } from 'lib/detect'; const log = debug('umami:auth'); @@ -67,7 +68,7 @@ export default async ( }); } - log('Login failed:', { username, user }); + log(`Login from ip ${getIpAddress(req)} with username "${username.replace(/["\r\n]/g, '')}" failed.`); return unauthorized(res, 'message.incorrect-username-password'); }