Skip to content

Commit

Permalink
Add primary email to "Unknown auth type" error
Browse files Browse the repository at this point in the history
  • Loading branch information
N2D4 committed Jul 20, 2024
1 parent 51fa7b2 commit 6beb64f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/data-table/user-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ const columns: ColumnDef<ExtendedServerUser>[] = [
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);
}
Expand Down

0 comments on commit 6beb64f

Please sign in to comment.