Skip to content

Doesn't Successfully Remove Last Name #11

@lotap

Description

@lotap

When I tried to remove the last name from my profile, the UI would optimistically show the change but would revert on refresh.

The convex update is successful, but clerk fails mostly silently.

if (nameChanged && authUser && authUser.update) {
try {
// Split name into first and last for Clerk
const nameParts = newName.trim().split(" ");
const firstName = nameParts[0] || "";
const lastName = nameParts.slice(1).join(" ") || "";
await authUser.update({
firstName: firstName,
lastName: lastName,
});
} catch (clerkError) {
console.warn("Clerk name update failed:", clerkError);
// Don't fail the whole operation if Clerk update fails
// The Convex update already succeeded
}
}

I tested it again in my browser after finding that code and can confirm that I see the warning logged.

If this is a hard requirement for clerk, maybe the name field should be split to first / last with both required.

Happy to help with a PR if you would like one

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions