Skip to content

Broken Trino impersonation #371

Open
Open

Description

@Bohreromir

In #330 I set input: false on user.additionalFields.username to stop users from changing it through /api/auth/update-user.
But better-auth also applies input: false to the OAuth provider profile: parseAdditionalUserInputFromProviderProfile skips such fields, so the username returned by mapProfileToUser is dropped when the user is created.

Without a username, the Trino API routes fall back to locals.user?.username ?? 'anonymous', which hides the error and breaks impersonation.

Activity

  1. added theissue type on Oct 8, 2026
  2. Bohreromir commented on Oct 8, 2026

    @Bohreromir
    MemberAuthor
  3. self-assigned this
    on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions