@strands.gg/accui 1.1.1 → 1.1.3
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 +24 -17
- package/dist/strands-auth-ui.cjs.js.map +1 -1
- package/dist/strands-auth-ui.es.js +25 -18
- 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-CZ7inSUU.js → useStrandsAuth-CQVn1lPb.js} +2 -2
- package/dist/{useStrandsAuth-CZ7inSUU.js.map → useStrandsAuth-CQVn1lPb.js.map} +1 -1
- package/dist/{useStrandsAuth-fa48rk-t.cjs → useStrandsAuth-DsgsSSDi.cjs} +2 -2
- package/dist/{useStrandsAuth-fa48rk-t.cjs.map → useStrandsAuth-DsgsSSDi.cjs.map} +1 -1
- package/dist/{useStrandsConfig-CtKyh8RT.cjs → useStrandsConfig-CjQTmiYi.cjs} +3 -1
- package/dist/useStrandsConfig-CjQTmiYi.cjs.map +1 -0
- package/dist/{useStrandsConfig-Cbpo8XZg.js → useStrandsConfig-EVnsLNNn.js} +3 -1
- package/dist/useStrandsConfig-EVnsLNNn.js.map +1 -0
- package/dist/vue/components/StrandsAuth.vue.d.ts +0 -1
- package/dist/vue/components/StrandsAuth.vue.d.ts.map +1 -1
- package/dist/vue/components/StrandsCompleteSignUp.vue.d.ts +1 -3
- package/dist/vue/components/StrandsCompleteSignUp.vue.d.ts.map +1 -1
- package/dist/vue/components/StrandsSignIn.vue.d.ts +0 -1
- package/dist/vue/components/StrandsSignIn.vue.d.ts.map +1 -1
- package/dist/vue/components/StrandsSignUp.vue.d.ts +0 -1
- package/dist/vue/components/StrandsSignUp.vue.d.ts.map +1 -1
- package/dist/vue/composables/useOAuthProviders.d.ts.map +1 -1
- package/dist/vue/composables/useStrandsConfig.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/useStrandsConfig-Cbpo8XZg.js.map +0 -1
- package/dist/useStrandsConfig-CtKyh8RT.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const app = require("nuxt/app");
|
|
4
|
-
const useStrandsAuth$1 = require("../../../useStrandsAuth-
|
|
4
|
+
const useStrandsAuth$1 = require("../../../useStrandsAuth-DsgsSSDi.cjs");
|
|
5
5
|
const useStrandsAuth = () => {
|
|
6
6
|
const config = app.useRuntimeConfig().public["strandsAuth"];
|
|
7
7
|
const vueAuth = useStrandsAuth$1.useStrandsAuth();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRuntimeConfig, navigateTo } from "nuxt/app";
|
|
2
|
-
import { u as useStrandsAuth$1 } from "../../../useStrandsAuth-
|
|
2
|
+
import { u as useStrandsAuth$1 } from "../../../useStrandsAuth-CQVn1lPb.js";
|
|
3
3
|
const useStrandsAuth = () => {
|
|
4
4
|
const config = useRuntimeConfig().public["strandsAuth"];
|
|
5
5
|
const vueAuth = useStrandsAuth$1();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const app = require("nuxt/app");
|
|
3
|
-
const useStrandsConfig = require("../../useStrandsConfig-
|
|
3
|
+
const useStrandsConfig = require("../../useStrandsConfig-CjQTmiYi.cjs");
|
|
4
4
|
const plugin_client = app.defineNuxtPlugin({
|
|
5
5
|
name: "strands-auth-client",
|
|
6
6
|
async setup() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
|
|
2
|
-
import { p as provideStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-
|
|
2
|
+
import { p as provideStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-EVnsLNNn.js";
|
|
3
3
|
const plugin_client = defineNuxtPlugin({
|
|
4
4
|
name: "strands-auth-client",
|
|
5
5
|
async setup() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const app = require("nuxt/app");
|
|
3
|
-
const useStrandsConfig = require("../../useStrandsConfig-
|
|
3
|
+
const useStrandsConfig = require("../../useStrandsConfig-CjQTmiYi.cjs");
|
|
4
4
|
const plugin_server = app.defineNuxtPlugin({
|
|
5
5
|
name: "strands-auth-server",
|
|
6
6
|
setup() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
|
|
2
|
-
import { p as provideStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-
|
|
2
|
+
import { p as provideStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-EVnsLNNn.js";
|
|
3
3
|
const plugin_server = defineNuxtPlugin({
|
|
4
4
|
name: "strands-auth-server",
|
|
5
5
|
setup() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const app = require("nuxt/app");
|
|
4
|
-
const useStrandsAuth$1 = require("../../../useStrandsAuth-
|
|
4
|
+
const useStrandsAuth$1 = require("../../../useStrandsAuth-DsgsSSDi.cjs");
|
|
5
5
|
const useStrandsAuth = () => {
|
|
6
6
|
const config = app.useRuntimeConfig().public["strandsAuth"];
|
|
7
7
|
const vueAuth = useStrandsAuth$1.useStrandsAuth();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRuntimeConfig, navigateTo } from "nuxt/app";
|
|
2
|
-
import { u as useStrandsAuth$1 } from "../../../useStrandsAuth-
|
|
2
|
+
import { u as useStrandsAuth$1 } from "../../../useStrandsAuth-CQVn1lPb.js";
|
|
3
3
|
const useStrandsAuth = () => {
|
|
4
4
|
const config = useRuntimeConfig().public["strandsAuth"];
|
|
5
5
|
const vueAuth = useStrandsAuth$1();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const app = require("nuxt/app");
|
|
3
|
-
const useStrandsConfig = require("../../useStrandsConfig-
|
|
3
|
+
const useStrandsConfig = require("../../useStrandsConfig-CjQTmiYi.cjs");
|
|
4
4
|
const plugin_client = app.defineNuxtPlugin({
|
|
5
5
|
name: "strands-auth-client-v4",
|
|
6
6
|
async setup() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
|
|
2
|
-
import { p as provideStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-
|
|
2
|
+
import { p as provideStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-EVnsLNNn.js";
|
|
3
3
|
const plugin_client = defineNuxtPlugin({
|
|
4
4
|
name: "strands-auth-client-v4",
|
|
5
5
|
async setup() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const app = require("nuxt/app");
|
|
3
|
-
const useStrandsConfig = require("../../useStrandsConfig-
|
|
3
|
+
const useStrandsConfig = require("../../useStrandsConfig-CjQTmiYi.cjs");
|
|
4
4
|
const plugin_server = app.defineNuxtPlugin({
|
|
5
5
|
name: "strands-auth-server-v4",
|
|
6
6
|
setup() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
|
|
2
|
-
import { S as STRANDS_AUTH_DEFAULTS, p as provideStrandsConfig } from "../../useStrandsConfig-
|
|
2
|
+
import { S as STRANDS_AUTH_DEFAULTS, p as provideStrandsConfig } from "../../useStrandsConfig-EVnsLNNn.js";
|
|
3
3
|
const plugin_server = defineNuxtPlugin({
|
|
4
4
|
name: "strands-auth-server-v4",
|
|
5
5
|
setup() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const useStrandsConfig = require("./useStrandsConfig-
|
|
5
|
-
const useStrandsAuth = require("./useStrandsAuth-
|
|
4
|
+
const useStrandsConfig = require("./useStrandsConfig-CjQTmiYi.cjs");
|
|
5
|
+
const useStrandsAuth = require("./useStrandsAuth-DsgsSSDi.cjs");
|
|
6
6
|
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
7
7
|
__name: "UiAlert",
|
|
8
8
|
props: {
|
|
@@ -1870,7 +1870,12 @@ function useOAuthProviders(options = {}) {
|
|
|
1870
1870
|
const redirectUrl = options.redirectUrl || config.value?.oauth2RedirectUrl;
|
|
1871
1871
|
if (redirectUrl) {
|
|
1872
1872
|
const params = new URLSearchParams();
|
|
1873
|
-
|
|
1873
|
+
let absoluteRedirectUrl = redirectUrl;
|
|
1874
|
+
if (redirectUrl.startsWith("/")) {
|
|
1875
|
+
const currentOrigin = window.location.origin;
|
|
1876
|
+
absoluteRedirectUrl = `${currentOrigin}${redirectUrl}`;
|
|
1877
|
+
}
|
|
1878
|
+
params.append("redirect_url", absoluteRedirectUrl);
|
|
1874
1879
|
url = `${url}?${params.toString()}`;
|
|
1875
1880
|
}
|
|
1876
1881
|
const response = await fetch(url, {
|
|
@@ -1896,7 +1901,12 @@ function useOAuthProviders(options = {}) {
|
|
|
1896
1901
|
const mergedOptions = { ...options, ...customOptions };
|
|
1897
1902
|
const params = new URLSearchParams();
|
|
1898
1903
|
if (mergedOptions.redirectUrl) {
|
|
1899
|
-
|
|
1904
|
+
let absoluteRedirectUrl = mergedOptions.redirectUrl;
|
|
1905
|
+
if (mergedOptions.redirectUrl.startsWith("/")) {
|
|
1906
|
+
const currentOrigin = window.location.origin;
|
|
1907
|
+
absoluteRedirectUrl = `${currentOrigin}${mergedOptions.redirectUrl}`;
|
|
1908
|
+
}
|
|
1909
|
+
params.append("redirect_url", absoluteRedirectUrl);
|
|
1900
1910
|
}
|
|
1901
1911
|
if (mergedOptions.scopes && mergedOptions.scopes.length > 0) {
|
|
1902
1912
|
params.append("scopes", mergedOptions.scopes.join(","));
|
|
@@ -1977,7 +1987,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
1977
1987
|
__name: "StrandsAuth",
|
|
1978
1988
|
props: {
|
|
1979
1989
|
mode: { type: String, required: false, default: "signin" },
|
|
1980
|
-
redirectUrl: { type: String, required: false
|
|
1990
|
+
redirectUrl: { type: String, required: false },
|
|
1981
1991
|
config: { type: Object, required: false }
|
|
1982
1992
|
},
|
|
1983
1993
|
emits: ["success", "error", "forgot-password", "password-reset-sent", "mode-changed"],
|
|
@@ -2648,7 +2658,7 @@ const StrandsAuth = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_re
|
|
|
2648
2658
|
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
2649
2659
|
__name: "StrandsSignIn",
|
|
2650
2660
|
props: {
|
|
2651
|
-
redirectUrl: { type: String, required: false
|
|
2661
|
+
redirectUrl: { type: String, required: false },
|
|
2652
2662
|
oauthScopes: { type: Array, required: false, default: () => [] },
|
|
2653
2663
|
config: { type: Object, required: false }
|
|
2654
2664
|
},
|
|
@@ -3060,7 +3070,7 @@ const StrandsSignIn = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_
|
|
|
3060
3070
|
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
3061
3071
|
__name: "StrandsSignUp",
|
|
3062
3072
|
props: {
|
|
3063
|
-
redirectUrl: { type: String, required: false
|
|
3073
|
+
redirectUrl: { type: String, required: false },
|
|
3064
3074
|
oauthScopes: { type: Array, required: false, default: () => [] },
|
|
3065
3075
|
config: { type: Object, required: false }
|
|
3066
3076
|
},
|
|
@@ -3563,7 +3573,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
3563
3573
|
__name: "StrandsCompleteSignUp",
|
|
3564
3574
|
props: {
|
|
3565
3575
|
token: { type: String, required: false },
|
|
3566
|
-
redirectUrl: { type: String, required: false
|
|
3576
|
+
redirectUrl: { type: String, required: false },
|
|
3567
3577
|
config: { type: Object, required: false }
|
|
3568
3578
|
},
|
|
3569
3579
|
emits: ["success", "error", "invalid-token", "request-new-link", "start-registration"],
|
|
@@ -3616,10 +3626,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
3616
3626
|
}
|
|
3617
3627
|
}
|
|
3618
3628
|
);
|
|
3619
|
-
const
|
|
3620
|
-
baseUrl: props.config?.baseUrl || "http://localhost:8000",
|
|
3621
|
-
referrerUrl: props.redirectUrl || "http://localhost:3001"
|
|
3622
|
-
}));
|
|
3629
|
+
const redirectUrl = vue.computed(() => props.redirectUrl || window.location.origin);
|
|
3623
3630
|
vue.onMounted(() => {
|
|
3624
3631
|
if (props.token) {
|
|
3625
3632
|
try {
|
|
@@ -3636,9 +3643,9 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
3636
3643
|
}
|
|
3637
3644
|
});
|
|
3638
3645
|
const redirectToReferrer = () => {
|
|
3639
|
-
if (
|
|
3640
|
-
console.log("Redirecting to referrer:",
|
|
3641
|
-
window.location.href =
|
|
3646
|
+
if (redirectUrl.value) {
|
|
3647
|
+
console.log("Redirecting to referrer:", redirectUrl.value);
|
|
3648
|
+
window.location.href = redirectUrl.value;
|
|
3642
3649
|
}
|
|
3643
3650
|
};
|
|
3644
3651
|
const handleCompleteSignUp = async () => {
|
|
@@ -3656,7 +3663,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
3656
3663
|
}
|
|
3657
3664
|
loading2.value = true;
|
|
3658
3665
|
try {
|
|
3659
|
-
const response = await fetch(
|
|
3666
|
+
const response = await fetch(getUrl("completeRegistration"), {
|
|
3660
3667
|
method: "POST",
|
|
3661
3668
|
headers: {
|
|
3662
3669
|
"Content-Type": "application/json"
|
|
@@ -3705,7 +3712,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
3705
3712
|
loading2.value = false;
|
|
3706
3713
|
}
|
|
3707
3714
|
};
|
|
3708
|
-
const __returned__ = { props, emit, getUrl, getSupportEmail, setAuthData, registrationComplete, invalidToken, loading: loading2, error, email, form, fieldErrors, isFormValid,
|
|
3715
|
+
const __returned__ = { props, emit, getUrl, getSupportEmail, setAuthData, registrationComplete, invalidToken, loading: loading2, error, email, form, fieldErrors, isFormValid, redirectUrl, redirectToReferrer, handleCompleteSignUp, get StrandsUiCard() {
|
|
3709
3716
|
return StrandsUiCard;
|
|
3710
3717
|
}, get StrandsUiButton() {
|
|
3711
3718
|
return StrandsUiButton;
|