mirror of
https://github.com/better-auth/better-auth.git
synced 2026-08-16 02:58:43 -05:00
Spread data before the explicit email, name, and role so a caller cannot override the validated and normalized values through data. Validate requested roles with an own-property check so inherited keys like toString no longer pass the configured-roles guard. Applies the own-property check to setRole and adminUpdateUser as well.