Merge branch 'main' into v1.2

This commit is contained in:
Bereket Engida
2025-02-14 15:17:41 +03:00
32 changed files with 468 additions and 98 deletions

View File

@@ -223,6 +223,24 @@ const { data, error } = await authClient.resetPassword({
});
```
### Update password
<Callout type="warn">
This only works on server-side, and the following code may change over time.
</Callout>
To set a password, you must hash it first:
```ts
const ctx = await auth.$context;
const hash = await ctx.password.hash("your-new-password");
```
Then, to set the password:
```ts
await ctx.internalAdapter.updatePassword("userId", hash) //(you can also use your orm directly)
```
### Configuration
**Password**