@protobase/cli 0.46.7 → 0.46.8

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.
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.46.7";
2
+ var version = "0.46.8";
3
3
  //#endregion
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/cli",
3
- "version": "0.46.7",
3
+ "version": "0.46.8",
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.7",
40
- "@protobase/query": "0.46.7",
41
- "@protobase/schema": "0.46.7",
42
- "@protobase/server": "0.46.7",
43
- "@protobase/ui": "0.46.7",
39
+ "@protobase/layout": "0.46.8",
40
+ "@protobase/query": "0.46.8",
41
+ "@protobase/schema": "0.46.8",
42
+ "@protobase/server": "0.46.8",
43
+ "@protobase/ui": "0.46.8",
44
44
  "@react-email/render": "^2.1.0",
45
45
  "@scalar/hono-api-reference": "^0.12.10",
46
46
  "@tailwindcss/vite": "^4.3.3",
@@ -9,6 +9,7 @@ Sign-in methods, users, roles, organizations and tokens.
9
9
  - [Existing users table](../reference/auth.md#an-existing-users-table): Sign-in can use the users table another system keeps in the same database.
10
10
  - [Users page](../reference/auth.md#users-page): Admins find people, set roles, block them, add accounts and invite people by email.
11
11
  - [Password reset](../reference/auth.md#password-reset): People reset a forgotten password through an emailed link.
12
+ - [Leaked passwords](../reference/auth.md#leaked-passwords): New passwords that appear in a known data breach are refused, when the app turns the check on.
12
13
  - [Emailed sign-in codes](../reference/auth.md#emailed-sign-in-codes): People sign in with a code sent to their email. An address with no account is emailed that it has none, so the person tries the one they signed up with.
13
14
  - [Changing the address](../reference/auth.md#changing-the-address): People move their account to a new email address from the account page, once they enter the code sent there.
14
15
  - [Open sign-up](../reference/auth.md#open-sign-up): Anyone can create an account after confirming an emailed code.
@@ -226,6 +226,20 @@ On the [account page](#account-page), the `Password` block does both: with a pas
226
226
 
227
227
  The [account page](#account-page)'s Devices tab lists the sessions with this one first and marked, a Sign out on each other one and Sign out of all other devices. It names each by its browser and system from the user agent, and a staff session by the operator alone, such as "Protobase staff" with when it signed in and until when, never the staff member.
228
228
 
229
+ ## Leaked passwords
230
+
231
+ `leakedPasswords: true` refuses a new password that appears in a known data breach. It is off by default, since it sends a request to an outside service each time a password is set.
232
+
233
+ ```ts
234
+ createAuth({ ..., leakedPasswords: true })
235
+ ```
236
+
237
+ The check is Better Auth's [haveIBeenPwned](https://www.better-auth.com/docs/plugins/have-i-been-pwned) plugin's: only the first five characters of the password's SHA-1 hash go to Have I Been Pwned's Pwned Passwords range API, which answers with every leaked hash that starts with them, so the password itself never leaves the server. It runs wherever someone chooses a password: [open sign-up](#open-sign-up), an [invitation](#organizations), a first password (`/account/set-password`), a change, a [reset](#password-reset), and an admin adding an account or setting a password, `createUser` on the host included. Signing in never checks.
238
+
239
+ - A leaked password is refused with `400` and the code `PASSWORD_COMPROMISED`, before anything is saved; Protobase's pages say "This password appears in a known data breach. Choose a different one." The [GoTrue-compatible](#supabase-js-and-supabasessr) `signUp` and `updateUser` answer `422 weak_password`.
240
+ - A password outside the 12 to 128 characters is refused for its length, with no lookup.
241
+ - While the service cannot be reached, setting a password fails with a `500`; signing in is not affected.
242
+
229
243
  ## Changing the address
230
244
 
231
245
  With mail configured, the account page's Profile tab offers "Change email": the person enters the new address, gets a 6-digit code there, and enters it. Only then does the account move to the new address, which counts as verified; they sign in with it from then on, and this device stays signed in. It is Better Auth's [email OTP](https://www.better-auth.com/docs/plugins/email-otp) plugin's address change, and `GET /api/auth/status` says `"changeEmail": true` while it is offered. The client has it in `session.account`: