@strands.gg/accui 2.9.3 → 2.9.5
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/accui.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +208 -158
- package/dist/nuxt/runtime/composables/useAuthenticatedFetch.es.js +0 -2
- package/dist/nuxt/runtime/composables/useStrandsAuth.es.js +1 -1
- package/dist/nuxt/runtime/middleware/auth.global.es.js +0 -3
- package/dist/nuxt/runtime/plugins/auth-interceptor.client.es.js +0 -1
- package/dist/{useStrandsAuth-Xz8lnhv7.es.js → useStrandsAuth-Dca-zFQT.es.js} +0 -1
- package/package.json +1 -1
|
@@ -38,7 +38,6 @@ function useAuthenticatedFetch() {
|
|
|
38
38
|
};
|
|
39
39
|
let response = await fetch(fullUrl, enhancedOptions);
|
|
40
40
|
if (response.status === 401 && autoRefresh && currentSession.value?.refreshToken) {
|
|
41
|
-
console.log("[Strands Auth] Request failed with 401, attempting token refresh...");
|
|
42
41
|
try {
|
|
43
42
|
const refreshed = await refreshToken();
|
|
44
43
|
if (refreshed && currentSession.value?.accessToken) {
|
|
@@ -46,7 +45,6 @@ function useAuthenticatedFetch() {
|
|
|
46
45
|
Object.entries(newAuthHeaders).forEach(([key, value]) => {
|
|
47
46
|
headers.set(key, value);
|
|
48
47
|
});
|
|
49
|
-
console.log("[Strands Auth] Retrying request with refreshed token");
|
|
50
48
|
response = await fetch(fullUrl, { ...enhancedOptions, headers });
|
|
51
49
|
}
|
|
52
50
|
} catch (refreshError) {
|
|
@@ -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-Dca-zFQT.es.js";
|
|
3
3
|
const useStrandsAuth = () => {
|
|
4
4
|
const config = useRuntimeConfig().public["strandsAuth"];
|
|
5
5
|
const vueAuth = useStrandsAuth$1();
|
|
@@ -24,10 +24,8 @@ const auth_global = defineNuxtRouteMiddleware((to) => {
|
|
|
24
24
|
return currentPath === route || currentPath.startsWith(route + "/");
|
|
25
25
|
});
|
|
26
26
|
if (isProtectedRoute && !isAuthenticated.value) {
|
|
27
|
-
console.log("[Strands Auth] Protected route accessed without authentication, redirecting to auth");
|
|
28
27
|
const authUrl = config.onSignOutUrl || "/auth";
|
|
29
28
|
const redirectUrl = authUrl.includes("?") ? `${authUrl}&redirect=${encodeURIComponent(currentPath)}` : `${authUrl}?redirect=${encodeURIComponent(currentPath)}`;
|
|
30
|
-
console.log("[Strands Auth] Redirecting to:", redirectUrl);
|
|
31
29
|
try {
|
|
32
30
|
return navigateTo(redirectUrl);
|
|
33
31
|
} catch (error) {
|
|
@@ -40,7 +38,6 @@ const auth_global = defineNuxtRouteMiddleware((to) => {
|
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
if (isGuestOnlyRoute && isAuthenticated.value) {
|
|
43
|
-
console.log("[Strands Auth] Guest-only route accessed while authenticated, redirecting");
|
|
44
41
|
return navigateTo(config.onSignInUrl || "/dashboard");
|
|
45
42
|
}
|
|
46
43
|
resolve();
|
|
@@ -28,7 +28,6 @@ const authInterceptor_client = defineNuxtPlugin({
|
|
|
28
28
|
...init,
|
|
29
29
|
headers
|
|
30
30
|
};
|
|
31
|
-
console.log("[Strands Auth] Injecting auth headers for request:", url);
|
|
32
31
|
return originalFetch(input, enhancedInit);
|
|
33
32
|
} catch (error) {
|
|
34
33
|
console.warn("[Strands Auth] Failed to inject auth headers:", error);
|