use `updateUser` in route handler

yo so ik u use authClient on client side
but if i want to Update User Information on server side (from a route handler) what do i do?

docs show
await authClient.updateUser({ image: "https://example.com/image.jpg", name: "John Doe", })

but idt i can use authClient and pass user info on a route handler

I want to set that value to a field the client cant see
my config:
user: { additionalFields: { // when user uploads / or edits raw data, it gets added to their user object raw_data_mongo_ref_id: { // (TODO: make sure this is updated when edited) type: "string", required: false, default: "null", input: false, // don't allow users to set this value }, }, },

using mongo as my db
Solution
And for server from your auth.ts
Was this page helpful?