From 6beb64fab0380947a7f6ea5f4eb13f24336940fb Mon Sep 17 00:00:00 2001 From: Stan Wohlwend Date: Sat, 20 Jul 2024 13:37:40 -0700 Subject: [PATCH] Add primary email to "Unknown auth type" error --- apps/dashboard/src/components/data-table/user-table.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dashboard/src/components/data-table/user-table.tsx b/apps/dashboard/src/components/data-table/user-table.tsx index cb4655784..792052e24 100644 --- a/apps/dashboard/src/components/data-table/user-table.tsx +++ b/apps/dashboard/src/components/data-table/user-table.tsx @@ -205,7 +205,7 @@ const columns: ColumnDef[] = [ export function extendUsers(users: ServerUser[]): ExtendedServerUser[] { return users.map((user) => ({ ...user, - authType: (user.emailAuthEnabled ? "email" : (user.oauthProviders[0]?.id ?? throwErr(`Unknown auth type for user ${user.displayName} (${user.id}) in project ${user.projectId} — neither e-mail nor OAuth enabled`))) || "", + authType: (user.emailAuthEnabled ? "email" : (user.oauthProviders[0]?.id ?? throwErr(`Unknown auth type for user ${user.displayName ?? user.primaryEmail} (${user.id}) in project ${user.projectId} — neither e-mail nor OAuth enabled`))) || "", emailVerified: user.primaryEmailVerified ? "verified" : "unverified", } satisfies ExtendedServerUser)).sort((a, b) => a.signedUpAt > b.signedUpAt ? -1 : 1); }