@strands.gg/accui 1.1.1 → 1.1.2
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/strands-auth-ui.cjs.js +16 -6
- package/dist/strands-auth-ui.cjs.js.map +1 -1
- package/dist/strands-auth-ui.es.js +16 -6
- package/dist/strands-auth-ui.es.js.map +1 -1
- 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/package.json +1 -1
|
@@ -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"],
|