fix issue with validation when google account has multiple spaces in name (#211)

This commit is contained in:
Dan Orlando 2023-05-07 17:31:27 -07:00 committed by GitHub
parent 3b4ed98c1d
commit 907f894ba7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}`,