cauthy-auth 0.27.0 → 0.27.1
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.js +3 -1
- package/dist/client.d.mts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +2 -2
- package/dist/client.mjs.map +1 -1
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react.js +4 -4
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +4 -4
- package/dist/react.mjs.map +1 -1
- package/dist/svelte.d.mts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/svelte.js +2 -2
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +2 -2
- package/dist/svelte.mjs.map +1 -1
- package/dist/{validate-BTRit1O1.d.mts → validate-YbEfIzfl.d.mts} +2 -2
- package/dist/{validate-BTRit1O1.d.ts → validate-YbEfIzfl.d.ts} +2 -2
- package/dist/vue.d.mts +1 -1
- package/dist/vue.d.ts +1 -1
- package/dist/vue.js +2 -2
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +2 -2
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -928,7 +928,9 @@ function createSystem(given = {}) {
|
|
|
928
928
|
async function fail2(res, what) {
|
|
929
929
|
const body = await res.json().catch(() => null);
|
|
930
930
|
const first = body?.errors?.[0];
|
|
931
|
-
|
|
931
|
+
const code = typeof body?.error === "string" ? body.error : first?.code;
|
|
932
|
+
const message = typeof body?.error === "string" ? body.error_description : first?.message;
|
|
933
|
+
throw new CauthyApiError(res.status, code ?? "error", `Cauthy refused ${what} (${res.status}): ${message ?? res.statusText}`);
|
|
932
934
|
}
|
|
933
935
|
let held;
|
|
934
936
|
let asking;
|
package/dist/client.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CauthyTheme } from './theme.mjs';
|
|
2
2
|
import { i as PublicSession } from './system-BxMsSIu1.mjs';
|
|
3
|
-
import { A as AuthField } from './validate-
|
|
4
|
-
export { F as FieldProblem, M as MIN_PASSWORD, c as checkCode, a as checkEmail, b as checkName, d as checkNewPassword, e as checkPassword } from './validate-
|
|
3
|
+
import { A as AuthField } from './validate-YbEfIzfl.mjs';
|
|
4
|
+
export { F as FieldProblem, M as MIN_PASSWORD, c as checkCode, a as checkEmail, b as checkName, d as checkNewPassword, e as checkPassword } from './validate-YbEfIzfl.mjs';
|
|
5
5
|
import 'jose';
|
|
6
6
|
|
|
7
7
|
/** Whether this browser can use a passkey at all. */
|
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CauthyTheme } from './theme.js';
|
|
2
2
|
import { i as PublicSession } from './system-DTIeDXDP.js';
|
|
3
|
-
import { A as AuthField } from './validate-
|
|
4
|
-
export { F as FieldProblem, M as MIN_PASSWORD, c as checkCode, a as checkEmail, b as checkName, d as checkNewPassword, e as checkPassword } from './validate-
|
|
3
|
+
import { A as AuthField } from './validate-YbEfIzfl.js';
|
|
4
|
+
export { F as FieldProblem, M as MIN_PASSWORD, c as checkCode, a as checkEmail, b as checkName, d as checkNewPassword, e as checkPassword } from './validate-YbEfIzfl.js';
|
|
5
5
|
import 'jose';
|
|
6
6
|
|
|
7
7
|
/** Whether this browser can use a passkey at all. */
|
package/dist/client.js
CHANGED
|
@@ -151,8 +151,8 @@ function fromWire(wire) {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
// src/validate.ts
|
|
154
|
-
var MIN_PASSWORD =
|
|
155
|
-
var MAX_PASSWORD =
|
|
154
|
+
var MIN_PASSWORD = 12;
|
|
155
|
+
var MAX_PASSWORD = 128;
|
|
156
156
|
var MAX_NAME = 120;
|
|
157
157
|
var EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
158
158
|
function checkEmail(value) {
|