cauthy-auth 0.36.1 → 0.38.0
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 +6 -2
- 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 +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +16 -2
- package/dist/react.d.ts +16 -2
- package/dist/react.js +283 -48
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +283 -48
- 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
|
@@ -2105,7 +2105,8 @@ function createCauthy(given = {}) {
|
|
|
2105
2105
|
if (route === "/me/mfa/setup") {
|
|
2106
2106
|
const res = await as("/v1/auth/mfa/setup", { password });
|
|
2107
2107
|
if (res.error) return refused(res, res.error.code === "step_up_required" ? "password" : void 0);
|
|
2108
|
-
|
|
2108
|
+
const qr = String(res.data?.qr ?? "");
|
|
2109
|
+
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
2110
|
}
|
|
2110
2111
|
if (route === "/me/mfa/verify") {
|
|
2111
2112
|
const bad = checkCode(b.code);
|