@strands.gg/accui 1.3.0 → 1.3.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/nuxt/runtime/composables/useStrandsAuth.cjs.js +1 -1
- package/dist/nuxt/runtime/composables/useStrandsAuth.es.js +1 -1
- package/dist/nuxt/runtime/plugin.client.cjs.js +1 -1
- package/dist/nuxt/runtime/plugin.client.es.js +1 -1
- package/dist/nuxt/runtime/plugin.server.cjs.js +1 -1
- package/dist/nuxt/runtime/plugin.server.es.js +1 -1
- package/dist/nuxt-v4/runtime/composables/useStrandsAuth.cjs.js +1 -1
- package/dist/nuxt-v4/runtime/composables/useStrandsAuth.es.js +1 -1
- package/dist/nuxt-v4/runtime/plugin.client.cjs.js +1 -1
- package/dist/nuxt-v4/runtime/plugin.client.es.js +1 -1
- package/dist/nuxt-v4/runtime/plugin.server.cjs.js +1 -1
- package/dist/nuxt-v4/runtime/plugin.server.es.js +1 -1
- package/dist/strands-auth-ui.cjs.js +31 -7
- package/dist/strands-auth-ui.cjs.js.map +1 -1
- package/dist/strands-auth-ui.es.js +32 -8
- package/dist/strands-auth-ui.es.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/{useStrandsAuth-DK6bMycB.cjs → useStrandsAuth-BCY250zc.cjs} +4 -4
- package/dist/useStrandsAuth-BCY250zc.cjs.map +1 -0
- package/dist/{useStrandsAuth-DiT3EcHV.js → useStrandsAuth-DCKbUhTa.js} +4 -4
- package/dist/useStrandsAuth-DCKbUhTa.js.map +1 -0
- package/dist/{useStrandsConfig-EVnsLNNn.js → useStrandsConfig-gjVpu8j8.js} +5 -3
- package/dist/useStrandsConfig-gjVpu8j8.js.map +1 -0
- package/dist/{useStrandsConfig-CjQTmiYi.cjs → useStrandsConfig-nSwWMPqi.cjs} +5 -3
- package/dist/useStrandsConfig-nSwWMPqi.cjs.map +1 -0
- package/dist/vue/components/StrandsHardwareKeySetupModal.vue.d.ts.map +1 -1
- package/dist/vue/components/StrandsMfaVerification.vue.d.ts.map +1 -1
- package/dist/vue/composables/useStrandsConfig.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/useStrandsAuth-DK6bMycB.cjs.map +0 -1
- package/dist/useStrandsAuth-DiT3EcHV.js.map +0 -1
- package/dist/useStrandsConfig-CjQTmiYi.cjs.map +0 -1
- package/dist/useStrandsConfig-EVnsLNNn.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, createCommentVNode, toDisplayString, renderSlot, createTextVNode, useSlots, ref, createBlock, resolveDynamicComponent, mergeProps, withCtx, onMounted, nextTick, toRefs, watch, Fragment, renderList, normalizeStyle, Teleport, withModifiers, createVNode, createSlots, onBeforeUnmount, withKeys, reactive, Transition, h, createStaticVNode } from "vue";
|
|
2
|
-
import { u as useStrandsConfig, p as provideStrandsConfig } from "./useStrandsConfig-
|
|
3
|
-
import { s } from "./useStrandsConfig-
|
|
4
|
-
import { u as useStrandsAuth } from "./useStrandsAuth-
|
|
2
|
+
import { u as useStrandsConfig, p as provideStrandsConfig } from "./useStrandsConfig-gjVpu8j8.js";
|
|
3
|
+
import { s } from "./useStrandsConfig-gjVpu8j8.js";
|
|
4
|
+
import { u as useStrandsAuth } from "./useStrandsAuth-DCKbUhTa.js";
|
|
5
5
|
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "UiAlert",
|
|
7
7
|
props: {
|
|
@@ -1326,9 +1326,11 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
1326
1326
|
const onBackupCodeInput = (value) => {
|
|
1327
1327
|
let cleaned = value.replace(/[^a-zA-Z0-9-]/g, "").toLowerCase();
|
|
1328
1328
|
if (!/[-]/.test(cleaned) && cleaned.length > 4) {
|
|
1329
|
-
|
|
1329
|
+
const part1 = cleaned.substring(0, 4);
|
|
1330
|
+
const part2 = cleaned.substring(4, 8);
|
|
1331
|
+
cleaned = part2 ? `${part1}-${part2}` : part1;
|
|
1330
1332
|
}
|
|
1331
|
-
if (cleaned.replace(/-/g, "").length <=
|
|
1333
|
+
if (cleaned.replace(/-/g, "").length <= 8) {
|
|
1332
1334
|
backupCode.value = cleaned;
|
|
1333
1335
|
}
|
|
1334
1336
|
backupCodeError.value = "";
|
|
@@ -1846,7 +1848,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1846
1848
|
modelValue: $setup.backupCode,
|
|
1847
1849
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.backupCode = $event),
|
|
1848
1850
|
label: "Backup Code",
|
|
1849
|
-
placeholder: "abcd-
|
|
1851
|
+
placeholder: "abcd-1234",
|
|
1850
1852
|
error: $setup.backupCodeError,
|
|
1851
1853
|
disabled: $setup.loading,
|
|
1852
1854
|
onInput: $setup.onBackupCodeInput,
|
|
@@ -1973,7 +1975,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1973
1975
|
modelValue: $setup.backupCode,
|
|
1974
1976
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.backupCode = $event),
|
|
1975
1977
|
label: "Backup Code",
|
|
1976
|
-
placeholder: "abcd-
|
|
1978
|
+
placeholder: "abcd-1234",
|
|
1977
1979
|
error: $setup.backupCodeError,
|
|
1978
1980
|
disabled: $setup.loading,
|
|
1979
1981
|
onInput: $setup.onBackupCodeInput,
|
|
@@ -7526,6 +7528,28 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
7526
7528
|
const closeModal = () => {
|
|
7527
7529
|
emit("close");
|
|
7528
7530
|
};
|
|
7531
|
+
const getOptimalAuthenticatorSelection = (deviceType) => {
|
|
7532
|
+
if (deviceType === "passkey") {
|
|
7533
|
+
return {
|
|
7534
|
+
authenticatorAttachment: void 0,
|
|
7535
|
+
// Allow both platform and cross-platform for passkeys
|
|
7536
|
+
requireResidentKey: true,
|
|
7537
|
+
// Passkeys are resident credentials
|
|
7538
|
+
residentKey: "required",
|
|
7539
|
+
userVerification: "required"
|
|
7540
|
+
// Passkeys should always verify user
|
|
7541
|
+
};
|
|
7542
|
+
} else {
|
|
7543
|
+
return {
|
|
7544
|
+
authenticatorAttachment: "cross-platform",
|
|
7545
|
+
// Prefer external authenticators like YubiKey
|
|
7546
|
+
requireResidentKey: false,
|
|
7547
|
+
residentKey: "discouraged",
|
|
7548
|
+
userVerification: "discouraged"
|
|
7549
|
+
// YubiKeys work better with discouraged
|
|
7550
|
+
};
|
|
7551
|
+
}
|
|
7552
|
+
};
|
|
7529
7553
|
const createOptimizedWebAuthnChallenge = (challenge, deviceType) => {
|
|
7530
7554
|
const safeBufferConvert = (data) => {
|
|
7531
7555
|
try {
|
|
@@ -7735,7 +7759,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
7735
7759
|
const finish = () => {
|
|
7736
7760
|
emit("success");
|
|
7737
7761
|
};
|
|
7738
|
-
const __returned__ = { props, emit, mfaLoading, registerHardwareKey, completeHardwareKeyRegistration, currentSession, internalLoading, loading: loading2, step, deviceName, deviceNameError, registrationMessage, errorMessage, backupCodes, closeModal, createOptimizedWebAuthnChallenge, startSetup, handleRegisterHardwareKey, copyBackupCodes, finish, get StrandsUiButton() {
|
|
7762
|
+
const __returned__ = { props, emit, mfaLoading, registerHardwareKey, completeHardwareKeyRegistration, currentSession, internalLoading, loading: loading2, step, deviceName, deviceNameError, registrationMessage, errorMessage, backupCodes, closeModal, getOptimalAuthenticatorSelection, createOptimizedWebAuthnChallenge, startSetup, handleRegisterHardwareKey, copyBackupCodes, finish, get StrandsUiButton() {
|
|
7739
7763
|
return StrandsUiButton;
|
|
7740
7764
|
}, get StrandsUiInput() {
|
|
7741
7765
|
return StrandsUiInput;
|