Skip to content

Commit d45dbaf

Browse files
committed
refactor: add email trimming in google oauth helper
1 parent 505cdc3 commit d45dbaf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

server/config/passport.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ const getGooglePrimaryEmail = (googleEmails) => {
136136
) {
137137
return null;
138138
}
139-
return googleEmails[0]?.value || null;
139+
const primaryEmail = googleEmails[0]?.value?.trim();
140+
return primaryEmail || null;
140141
};
141142

142143
/**

0 commit comments

Comments
 (0)