{(() => {
authRef = useAuth();
return {authRef.isAuthenticated ? "authed" : "not-authed"}
;
diff --git a/packages/solid/src/types.ts b/packages/solid/src/types.ts
index fe4a8a8..0cc883e 100644
--- a/packages/solid/src/types.ts
+++ b/packages/solid/src/types.ts
@@ -1,8 +1,6 @@
-import type { OidcConfig } from "oidc-js-core";
-
export type { IdTokenClaims, AuthUser, AuthTokens, LoginOptions } from "oidc-js";
-import type { AuthUser, AuthTokens, LoginOptions } from "oidc-js";
+import type { OidcClientConfig, AuthUser, AuthTokens, LoginOptions } from "oidc-js";
import type { OidcUser } from "oidc-js-core";
/**
@@ -28,7 +26,7 @@ export interface AuthActions {
*/
export interface AuthContextValue {
/** The OIDC configuration used to initialize the provider. */
- config: OidcConfig;
+ config: OidcClientConfig;
/** The authenticated user, or null if not logged in. */
user: AuthUser | null;
/** Whether the user is currently authenticated. */
diff --git a/packages/svelte/package.json b/packages/svelte/package.json
index 6597adb..518f887 100644
--- a/packages/svelte/package.json
+++ b/packages/svelte/package.json
@@ -1,6 +1,6 @@
{
"name": "oidc-js-svelte",
- "version": "1.1.0",
+ "version": "1.1.2",
"description": "Simple OIDC authentication for Svelte 5. Context, runes, and auth guards with zero dependencies.",
"type": "module",
"svelte": "./dist/index.js",
diff --git a/packages/svelte/src/AuthProvider.svelte b/packages/svelte/src/AuthProvider.svelte
index 1d0cf58..1269611 100644
--- a/packages/svelte/src/AuthProvider.svelte
+++ b/packages/svelte/src/AuthProvider.svelte
@@ -16,16 +16,14 @@
```
-->
-
+
{#snippet children()}
{#if path === "/callback"}
diff --git a/tests/e2e/vue-app/src/main.ts b/tests/e2e/vue-app/src/main.ts
index 51a617a..9b566fc 100644
--- a/tests/e2e/vue-app/src/main.ts
+++ b/tests/e2e/vue-app/src/main.ts
@@ -8,6 +8,8 @@ import ProtectedA from "./views/ProtectedA.vue";
import ProtectedB from "./views/ProtectedB.vue";
const fetchProfile = localStorage.getItem("e2e-fetchProfile") !== "false";
+const autoRefreshInterval = Number(localStorage.getItem("e2e-autoRefreshInterval"));
+
const idpPort = import.meta.env.VITE_IDP_PORT ?? "9999";
const appPort = import.meta.env.VITE_APP_PORT ?? "5173";
@@ -30,8 +32,9 @@ app.use(oidcPlugin, {
redirectUri: `http://localhost:${appPort}/callback`,
scopes: ["openid", "profile", "email", "offline_access"],
postLogoutRedirectUri: `http://localhost:${appPort}`,
+ fetchProfile,
+ autoRefreshInterval: autoRefreshInterval || undefined,
},
- fetchProfile,
onLogin(returnTo: string) {
router.replace(returnTo);
},