#Internal Server Error with Google Login (Solved)

1 messages · Page 1 of 1 (latest)

lean tendon
#

Just updated to the latest version and I'm getting an internal server error when trying to login with google auth.

Everything has been working perfectly until I downloaded the latest version (i wasn't any behind) -- I checked the latest env to see if there were any changes, but i don't see anything obvious.

This is what ends up in the redirect token in the URL bar:

https://<customdomain>.com/oauth/google/callback?code=4%2F0Adeu5BVu8YSjoMBHYIEGUcgiupVlBJhJvBXH57_RxROTivFip3bnw_nMEtiSbpTketV8fg&scope=email+profile+openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&authuser=0&hd=<googlehostdomain>.com&prompt=none

I am not using port 3080, so I don't have that in my env. Allow social logon is true. As mentioned, this was working until the latest update just now.

lean tendon
#

the console error I'm receiving:

LibreChat | Error: User validation failed: username: is invalid
LibreChat | at ValidationError.inspect (/app/node_modules/mongoose/lib/error/validation.js:50:26)
LibreChat | at formatValue (node:internal/util/inspect:805:19)
LibreChat | at inspect (node:internal/util/inspect:364:10)
LibreChat | at formatWithOptionsInternal (node:internal/util/inspect:2298:40)
LibreChat | at formatWithOptions (node:internal/util/inspect:2160:10)
LibreChat | at console.value (node:internal/console/constructor:348:14)
LibreChat | at console.warn (node:internal/console/constructor:381:61)
LibreChat | at Strategy.googleLogin [as _verify] (/app/api/strategies/googleStrategy.js:34:13)
LibreChat | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
LibreChat | errors: {
LibreChat | username: ValidatorError: is invalid
LibreChat | at validate (/app/node_modules/mongoose/lib/schematype.js:1365:13)
LibreChat | at SchemaType.doValidate (/app/node_modules/mongoose/lib/schematype.js:1349:7)
LibreChat | at /app/node_modules/mongoose/lib/document.js:2947:18
LibreChat | at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
LibreChat | properties: [Object],
LibreChat | kind: 'regexp',
LibreChat | path: 'username',
LibreChat | value: '<my plaintext name>',
LibreChat | reason: undefined,
LibreChat | [Symbol(mongoose:validatorError)]: true
LibreChat | }
LibreChat | },
LibreChat | _message: 'User validation failed'
LibreChat | }
LibreChat | ValidationError: User validation failed: username: is invalid

#

LibreChat | at Document.invalidate (/app/node_modules/mongoose/lib/document.js:3162:32)
LibreChat | at /app/node_modules/mongoose/lib/document.js:2955:17
LibreChat | at /app/node_modules/mongoose/lib/schematype.js:1368:9
LibreChat | at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

#

Nevermind, solved it. It was that there was a space in my username. Fixed it in Mongodb.