cauthy-auth 0.37.0 → 0.38.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/README.md +1 -1
- package/dist/client.d.mts +2 -1
- package/dist/client.d.ts +2 -1
- package/dist/client.js.map +1 -1
- package/dist/client.mjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +4 -2
- package/dist/react.d.ts +4 -2
- package/dist/react.js +6 -3
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +6 -3
- package/dist/react.mjs.map +1 -1
- package/dist/styles.css +10 -0
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs.map +1 -1
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1742,7 +1742,8 @@ function createCauthy(given = {}) {
|
|
|
1742
1742
|
// Whether the workspace signs people in with a password at all. A
|
|
1743
1743
|
// Cauthy from before the setting says nothing of it: then it does.
|
|
1744
1744
|
passwordSignIn: settings.data?.allow_password !== false,
|
|
1745
|
-
|
|
1745
|
+
// The workspace's switch, and how the application's own system takes sign-ups.
|
|
1746
|
+
signUp: settings.data?.allow_signup !== false && settings.data?.signup?.mode !== "invite_only",
|
|
1746
1747
|
// The application's system makes an organization per sign-up: the form asks the company's name.
|
|
1747
1748
|
...settings.data?.signup?.organization?.ask === true ? { organization: { ask: true, required: settings.data.signup.organization.required === true } } : {},
|
|
1748
1749
|
// A sign-in link needs a page of the application to open.
|
|
@@ -2105,7 +2106,8 @@ function createCauthy(given = {}) {
|
|
|
2105
2106
|
if (route === "/me/mfa/setup") {
|
|
2106
2107
|
const res = await as("/v1/auth/mfa/setup", { password });
|
|
2107
2108
|
if (res.error) return refused(res, res.error.code === "step_up_required" ? "password" : void 0);
|
|
2108
|
-
|
|
2109
|
+
const qr = String(res.data?.qr ?? "");
|
|
2110
|
+
return json({ status: "started", secret: String(res.data?.secret ?? ""), otpauthUri: String(res.data?.otpauth_uri ?? ""), qr: qr.startsWith("data:image/png;base64,") ? qr : "" }, 200, mine.headers);
|
|
2109
2111
|
}
|
|
2110
2112
|
if (route === "/me/mfa/verify") {
|
|
2111
2113
|
const bad = checkCode(b.code);
|