mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
105 lines
1.5 KiB
Plaintext
105 lines
1.5 KiB
Plaintext
---
|
|
id: api-updateuser
|
|
title: "api.updateUser"
|
|
slug: api-updateuser
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
Updates the user data.
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
<ul className="method-list-group">
|
|
|
|
<li className="method-list-item">
|
|
<h4 className="method-list-item-label">
|
|
<span className="method-list-item-label-name">
|
|
jwt
|
|
</span>
|
|
<span className="method-list-item-label-badge required">
|
|
required
|
|
</span>
|
|
<span className="method-list-item-validation">
|
|
string
|
|
</span>
|
|
</h4>
|
|
<div class="method-list-item-description">
|
|
|
|
A valid, logged-in JWT.
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
|
|
<li className="method-list-item">
|
|
<h4 className="method-list-item-label">
|
|
<span className="method-list-item-label-name">
|
|
attributes
|
|
</span>
|
|
<span className="method-list-item-label-badge required">
|
|
required
|
|
</span>
|
|
<span className="method-list-item-validation">
|
|
UserAttributes
|
|
</span>
|
|
</h4>
|
|
<div class="method-list-item-description">
|
|
|
|
The data you want to update.
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
### Update user info that Gotrue holds (also used for setting new passwords)
|
|
|
|
|
|
|
|
<Tabs
|
|
defaultValue="js"
|
|
groupId="libraries"
|
|
values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
|
|
|
|
<TabItem value="js">
|
|
|
|
```js
|
|
const { error, data } = await api
|
|
.updateUser(access_token, { password : 'Why Shinji?' })
|
|
```
|
|
|
|
|
|
</TabItem>
|
|
<TabItem value="py">
|
|
|
|
|
|
```
|
|
Not yet implemented
|
|
```
|
|
|
|
|
|
</TabItem>
|
|
|
|
</Tabs> |