diff --git a/server/account/src/index.ts b/server/account/src/index.ts index c9a363c5c8..dee77a00a7 100644 --- a/server/account/src/index.ts +++ b/server/account/src/index.ts @@ -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) @@ -1893,6 +1896,9 @@ export async function loginWithProvider ( extra?: Record ): Promise { const email = cleanEmail(_email) + if (last == null) { + last = '' + } let account = await getAccount(db, email) if (account == null && extra !== undefined) { account = await getAccountByQuery(db, extra) @@ -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 = {