Merge branch 'bknd-io:main' into main

This commit is contained in:
Shishant Biswas
2026-03-13 17:27:35 +05:30
committed by GitHub
4 changed files with 303 additions and 1 deletions

View File

@@ -170,7 +170,7 @@ export const prerender = false;
theme: "dark",
logo_return_path: "/../"
}}
client:only
client:only="react"
/>
</body>
</html>

View File

@@ -30,6 +30,25 @@ With a focus on flexibility and ease of integration, bknd's authentication syste
---
## Server Module: `module.auth`
### `auth.changePassword([userId], [password])`
To change a user's password, use the `changePassword` method:
```ts
await app.module.auth.changePassword(user.id, password);
```
This method updates the password for the specified user.
- `userId`: The ID of the user whose password should be changed.
- `password`: The new password value.
This method throws an error if:
- The user with the given `userId` is not found.
- The user's authentication strategy is not `"password"` (e.g. the user registered via an OAuth provider).
## Securing Your Admin Portal
<Callout type="warn" title="Do not enable the Guard without an admin user">