From 907f894ba734fd364048475318f297ea65f82d48 Mon Sep 17 00:00:00 2001 From: Dan Orlando Date: Sun, 7 May 2023 17:31:27 -0700 Subject: [PATCH] fix issue with validation when google account has multiple spaces in name (#211) --- api/strategies/googleStrategy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/strategies/googleStrategy.js b/api/strategies/googleStrategy.js index 768c0991b1..756e25d20d 100644 --- a/api/strategies/googleStrategy.js +++ b/api/strategies/googleStrategy.js @@ -28,7 +28,7 @@ const googleLogin = new GoogleStrategy( const newUser = await new User({ provider: 'google', googleId: profile.id, - username: profile.name.givenName + profile.name.familyName, + username: profile.name.givenName, email: profile.emails[0].value, emailVerified: profile.emails[0].verified, name: `${profile.name.givenName} ${profile.name.familyName}`,