Skip to content

Commit

Permalink
Fix for null lastName during signup with google (hcengineering#5328)
Browse files Browse the repository at this point in the history
Signed-off-by: Praveen Erramilli <epraveenns@gmail.com>
  • Loading branch information
praveen-erramilli authored and tjaoc committed Apr 14, 2024
1 parent 31058c6 commit 1a277dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/account/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1844,6 +1844,9 @@ export async function joinWithProvider (
const email = cleanEmail(_email)
const invite = await getInvite(db, inviteId)
const workspace = await checkInvite(invite, email)
if (last == null) {
last = ''
}
let account = await getAccount(db, email)
if (account == null && extra !== undefined) {
account = await getAccountByQuery(db, extra)
Expand Down Expand Up @@ -1893,6 +1896,9 @@ export async function loginWithProvider (
extra?: Record<string, string>
): Promise<LoginInfo> {
const email = cleanEmail(_email)
if (last == null) {
last = ''
}
let account = await getAccount(db, email)
if (account == null && extra !== undefined) {
account = await getAccountByQuery(db, extra)
Expand All @@ -1909,7 +1915,6 @@ export async function loginWithProvider (
}
return result
}

const newAccount = await createAcc(ctx, db, productId, email, null, first, last, true, extra)

const result = {
Expand Down

0 comments on commit 1a277dd

Please sign in to comment.