Merge pull request #27060 from overleaf/em-log-oauth-authenticate-errors

Log OAuth authentication errors

GitOrigin-RevId: 32bb3c66b61d0de8cbbfe1da08042f06b4f4342a
This commit is contained in:
Eric Mc Sween
2025-07-10 17:08:45 -04:00
committed by Copybot
parent 2f2862ecd7
commit bc49968908

View File

@@ -392,6 +392,10 @@ const AuthenticationController = {
req.oauth_user = token.user
next()
} catch (err) {
logger.warn(
{ errName: err.name, errMessage: err.message },
'OAuth authenticate error'
)
if (
err.code === 400 &&
err.message === 'Invalid request: malformed authorization header'