client.auth.updateUser
Update the current user's profile.
Signature
class Client {
auth: {
updateUser(input: { name?: string; image?: string; metadata?: Record<string, unknown> }): Promise<AuthUser>
}
}
Parameters
| Name | Type | Required | Notes |
|---|---|---|---|
| string | no | New display name |
| string | no | Avatar URL |
| object | no | Arbitrary user metadata |
Examples
const user = await bf.auth.updateUser({
name: 'Alice Smith',
metadata: { department: 'engineering' },
})
Throws
| Error | Condition |
|---|---|
| API request failed |
| Network issue |
Pitfalls
- Auth required — the caller must have a valid auth session
- Metadata merge — metadata is shallow-merged, not replaced
See also
{auto-injected}
Tested against
{auto-injected}