@protobase/cli 0.46.2 → 0.46.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.46.
|
|
3
|
+
"version": "0.46.3",
|
|
4
4
|
"description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"@better-auth/core": "^1.7.12",
|
|
37
37
|
"@hono/node-server": "^2.1.3",
|
|
38
38
|
"@hono/vite-dev-server": "^0.26.1",
|
|
39
|
-
"@protobase/layout": "0.46.
|
|
40
|
-
"@protobase/query": "0.46.
|
|
41
|
-
"@protobase/schema": "0.46.
|
|
42
|
-
"@protobase/server": "0.46.
|
|
43
|
-
"@protobase/ui": "0.46.
|
|
39
|
+
"@protobase/layout": "0.46.3",
|
|
40
|
+
"@protobase/query": "0.46.3",
|
|
41
|
+
"@protobase/schema": "0.46.3",
|
|
42
|
+
"@protobase/server": "0.46.3",
|
|
43
|
+
"@protobase/ui": "0.46.3",
|
|
44
44
|
"@react-email/render": "^2.1.0",
|
|
45
45
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
46
46
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -163,6 +163,20 @@ createAuth({ ..., mailer: false })
|
|
|
163
163
|
- The link is on the origin the reset was asked on, when that is one of the app's.
|
|
164
164
|
- While the [sign-in policy](#sign-in-policy) turns passwords off, reset is off too (`403`).
|
|
165
165
|
|
|
166
|
+
## Name, password and devices
|
|
167
|
+
|
|
168
|
+
The signed-in person changes their own name and password, and signs out their other devices, with Better Auth's own endpoints. The client has them in `session.account`, each rejecting with `AuthError`:
|
|
169
|
+
|
|
170
|
+
| Client | Endpoint |
|
|
171
|
+
| --- | --- |
|
|
172
|
+
| `updateName(name)` | `POST /api/auth/update-user` with `{ name }` |
|
|
173
|
+
| `changePassword(current, next, signOutOthers)` | `POST /api/auth/change-password` with `{ currentPassword, newPassword, revokeOtherSessions }`, for an account that has a password (a wrong one is `INVALID_PASSWORD`) |
|
|
174
|
+
| `sessions()` | `GET /api/auth/list-sessions`: the devices signed in now, each `{ token, current, userAgent?, ipAddress?, createdAt, updatedAt, expiresAt, staff? }`, with `current` for this one and `staff` for a [staff session](#staff-sign-in) |
|
|
175
|
+
| `revokeSession(token)` | `POST /api/auth/revoke-session` with `{ token }`: signs out that device |
|
|
176
|
+
| `revokeOtherSessions()` | `POST /api/auth/revoke-other-sessions`: signs out every device but this one |
|
|
177
|
+
|
|
178
|
+
Signing out a device, or a new password with `signOutOthers`, stops that device's API token at its next request (see [When a token stops working](#when-a-token-stops-working)); this device stays signed in. A [staff session](#staff-sign-in) cannot change the password or sign out the other devices (`STAFF_CANNOT_CHANGE_SIGN_IN`).
|
|
179
|
+
|
|
166
180
|
## Emailed sign-in codes
|
|
167
181
|
|
|
168
182
|
With mail configured, the sign-in page offers "Email me a sign-in code": the person enters their address, gets a 6-digit code, and signs in with it instead of a password. It is Better Auth's [email OTP](https://www.better-auth.com/docs/plugins/email-otp) plugin: `POST /api/auth/email-otp/send-verification-otp` with `{ email, type: "sign-in" }`, then `POST /api/auth/sign-in/email-otp` with `{ email, otp }`.
|