{"_id":"@codecot/okta-zustand","_rev":"5-085aea04afd646a5ed7a92a4ec25a5e2","name":"@codecot/okta-zustand","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@codecot/okta-zustand","version":"0.1.0","keywords":["okta","authentication","oauth","oidc","react","zustand","auth"],"author":{"name":"Codecot"},"license":"MIT","_id":"@codecot/okta-zustand@0.1.0","maintainers":[{"name":"pasechnik","email":"vladimir.pasechnik@gmail.com"}],"homepage":"https://github.com/codecot/okta-zustand#readme","bugs":{"url":"https://github.com/codecot/okta-zustand/issues"},"dist":{"shasum":"01b541dadf24181d10ba42d297e22772500a9823","tarball":"https://registry.npmjs.org/@codecot/okta-zustand/-/okta-zustand-0.1.0.tgz","fileCount":9,"integrity":"sha512-6qz2+U0jVpIc4sM6JvowFlvImYYcCfg0g6WbvHoyAK1z7snJpD3hiUj8RK7lcssPs6nksiDU6QnIm1dnJIODcA==","signatures":[{"sig":"MEUCIHy1fvQ03i36jfQan8UtmQ1vUVnAGkX53q7tJhzebRJsAiEAunGWH+euEPXmkkHDDN9YUQmsxt1/Mj+7Dx0vzJuqBMc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":182073},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"ac1ba0188572085e8040aa1fdf1ebeecc14ccea5","scripts":{"dev":"tsup --watch","lint":"tsc --noEmit","build":"tsup","example":"npm run build && npm run example:dev","release":"changeset publish","changeset":"changeset","type-check":"tsc --noEmit","example:dev":"cd example && npm run dev","prepublishOnly":"npm run build","example:install":"cd example && npm install"},"_npmUser":{"name":"pasechnik","actor":{"name":"pasechnik","type":"user","email":"vladimir.pasechnik@gmail.com"},"email":"vladimir.pasechnik@gmail.com"},"repository":{"url":"git+https://github.com/codecot/okta-zustand.git","type":"git"},"_npmVersion":"10.8.2","description":"A modern Okta authentication library for React using Zustand state management","directories":{},"_nodeVersion":"20.19.2","dependencies":{"zustand":"^5.0.6"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4","@types/react":"^19.1.8","@changesets/cli":"^2.29.5","@types/react-router-dom":"^5.3.3"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0","react-router-dom":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/okta-zustand_0.1.0_1750979942656_0.2576403324404293","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@codecot/okta-zustand","version":"0.2.0","keywords":["okta","authentication","oauth","oidc","react","zustand","auth"],"author":{"name":"Codecot"},"license":"MIT","_id":"@codecot/okta-zustand@0.2.0","maintainers":[{"name":"pasechnik","email":"vladimir.pasechnik@gmail.com"}],"homepage":"https://github.com/codecot/okta-zustand#readme","bugs":{"url":"https://github.com/codecot/okta-zustand/issues"},"dist":{"shasum":"d2fbefeb2743bbacd9a375bd737feb6c02f587ae","tarball":"https://registry.npmjs.org/@codecot/okta-zustand/-/okta-zustand-0.2.0.tgz","fileCount":9,"integrity":"sha512-bfi72Os2UhIUJ4pzzGOkFHb1Qk/tnps7FJCksO8T5F5EUwZHhy0uXVcbiqX/8vUICrV2cNMKYpCuOeAXGgv3dA==","signatures":[{"sig":"MEUCIQCUQCQhcX4t//Ery6yVvE5g/OlpKU/xbOAdzcLcMpecgQIgQoSa5rJFKg9JNODUhmp9RwI+PpzJC9u9VYzgBbELM9M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":291204},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"ac1ba0188572085e8040aa1fdf1ebeecc14ccea5","scripts":{"dev":"tsup --watch","lint":"tsc --noEmit","build":"tsup","example":"npm run build && npm run example:dev","release":"changeset publish","changeset":"changeset","type-check":"tsc --noEmit","example:dev":"cd example && npm run dev","prepublishOnly":"npm run build","example:install":"cd example && npm install"},"_npmUser":{"name":"pasechnik","actor":{"name":"pasechnik","type":"user","email":"vladimir.pasechnik@gmail.com"},"email":"vladimir.pasechnik@gmail.com"},"repository":{"url":"git+https://github.com/codecot/okta-zustand.git","type":"git"},"_npmVersion":"10.8.2","description":"A modern Okta authentication library for React using Zustand state management","directories":{},"_nodeVersion":"20.19.2","dependencies":{"zustand":"^5.0.6"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4","@types/react":"^19.1.8","@changesets/cli":"^2.29.5","@types/react-router-dom":"^5.3.3"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0","react-router-dom":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/okta-zustand_0.2.0_1751215524272_0.49896934028795004","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@codecot/okta-zustand","version":"0.2.1","keywords":["okta","authentication","oauth","oidc","react","zustand","auth"],"author":{"name":"Codecot"},"license":"MIT","_id":"@codecot/okta-zustand@0.2.1","maintainers":[{"name":"pasechnik","email":"vladimir.pasechnik@gmail.com"}],"homepage":"https://github.com/codecot/okta-zustand#readme","bugs":{"url":"https://github.com/codecot/okta-zustand/issues"},"dist":{"shasum":"4b85e2adb63abd215a9b95d4998a6f4247a61921","tarball":"https://registry.npmjs.org/@codecot/okta-zustand/-/okta-zustand-0.2.1.tgz","fileCount":9,"integrity":"sha512-924I7MTo5dlXTlSsLQExm6sZLhMsLukoZ08aHyjPYdUFWVAeFkdnSCNMCO/aBfOe5wHYi5X/JuWpq2FG4ZNQng==","signatures":[{"sig":"MEQCIDeTnrWneLkNO+XGPDmx59zW6UhEvw23C07JAQWRZbreAiBtdrQyk2W/0N7N48rZSWoa7qHnLE2cKYleuEcbC2lPww==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":292183},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"ee2f80af879882e97e1b4f21e88007ce683bf1e8","scripts":{"dev":"tsup --watch","lint":"tsc --noEmit","build":"tsup","example":"npm run build && npm run example:dev","release":"changeset publish","changeset":"changeset","type-check":"tsc --noEmit","example:dev":"cd example && npm run dev","prepublishOnly":"npm run build","example:install":"cd example && npm install"},"_npmUser":{"name":"pasechnik","actor":{"name":"pasechnik","type":"user","email":"vladimir.pasechnik@gmail.com"},"email":"vladimir.pasechnik@gmail.com"},"repository":{"url":"git+https://github.com/codecot/okta-zustand.git","type":"git"},"_npmVersion":"10.8.2","description":"A modern Okta authentication library for React using Zustand state management","directories":{},"_nodeVersion":"20.19.2","dependencies":{"zustand":"^5.0.6"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4","@types/react":"^19.1.8","@changesets/cli":"^2.29.5","@types/react-router-dom":"^5.3.3"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0","react-router-dom":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/okta-zustand_0.2.1_1751225110706_0.07421871427051396","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@codecot/okta-zustand","version":"0.3.0","keywords":["okta","authentication","oauth","oidc","react","zustand","auth"],"author":{"name":"Codecot"},"license":"MIT","_id":"@codecot/okta-zustand@0.3.0","maintainers":[{"name":"pasechnik","email":"vladimir.pasechnik@gmail.com"}],"homepage":"https://github.com/codecot/okta-zustand#readme","bugs":{"url":"https://github.com/codecot/okta-zustand/issues"},"dist":{"shasum":"c67abc31f270bc4874911aac70e737f0e74ef3ea","tarball":"https://registry.npmjs.org/@codecot/okta-zustand/-/okta-zustand-0.3.0.tgz","fileCount":13,"integrity":"sha512-E0jomzEmlsNxvzQGtRB+Unn8PgYAiikxUc9sfAT/ZubU4d6HYUgo/kJO7zC1lzaNqNakcI5ieOpmVUe2MYkHWg==","signatures":[{"sig":"MEQCHykb9Ouc5i7nvKdtX5/PXf763NBSh31Lvyrd375kIiQCIQCESEN9nMVWptACz0lfGk+6nZzOzrMd9FlGaIio7T7nEA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":324427},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"62aedb7f122591bc51373c19fed690637c64cc7a","scripts":{"dev":"tsup --watch","lint":"tsc --noEmit","build":"tsup","example":"npm run build && npm run example:dev","release":"changeset publish","changeset":"changeset","type-check":"tsc --noEmit","example:dev":"cd example && npm run dev","prepublishOnly":"npm run build","example:install":"cd example && npm install"},"_npmUser":{"name":"pasechnik","actor":{"name":"pasechnik","type":"user","email":"vladimir.pasechnik@gmail.com"},"email":"vladimir.pasechnik@gmail.com"},"repository":{"url":"git+https://github.com/codecot/okta-zustand.git","type":"git"},"_npmVersion":"10.8.2","description":"A modern Okta authentication library for React using Zustand state management","directories":{},"_nodeVersion":"20.19.2","dependencies":{"zustand":"^5.0.6"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4","@types/react":"^19.1.8","@changesets/cli":"^2.29.5","@types/react-router-dom":"^5.3.3"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0","react-router-dom":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/okta-zustand_0.3.0_1751230184537_0.21969692892306458","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@codecot/okta-zustand","version":"0.4.0","description":"A modern Okta authentication library for React using Zustand state management","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup","dev":"tsup --watch","type-check":"tsc --noEmit","lint":"tsc --noEmit","prepublishOnly":"npm run build","changeset":"changeset","release":"changeset publish","example:install":"cd example && npm install","example:dev":"cd example && npm run dev","example":"npm run build && npm run example:dev"},"keywords":["okta","authentication","oauth","oidc","react","zustand","auth"],"author":{"name":"Codecot"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/codecot/okta-zustand.git"},"bugs":{"url":"https://github.com/codecot/okta-zustand/issues"},"homepage":"https://github.com/codecot/okta-zustand#readme","devDependencies":{"@changesets/cli":"^2.29.5","@types/node":"^24.0.4","@types/react":"^19.1.8","@types/react-router-dom":"^5.3.3","tsup":"^8.5.0","typescript":"^5.8.3"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0","react-router-dom":">=6.0.0"},"dependencies":{"zustand":"^5.0.6"},"_id":"@codecot/okta-zustand@0.4.0","gitHead":"b66310afb6826da8a6f3d143dc00bc0457f79f89","_nodeVersion":"20.19.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-7JA/StM6dYllgOzk0RSZANJGOzK5ybnplAeeccRbsHnxl4zta+wdGM9J0taISJ3l2Evso7l3MTOOfdmbC3A06g==","shasum":"dec17f287d622764f1fafa8ffebe777f601f95d2","tarball":"https://registry.npmjs.org/@codecot/okta-zustand/-/okta-zustand-0.4.0.tgz","fileCount":13,"unpackedSize":372456,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEk6nOI+Wz2T+eE+N7aE3xQUYCbDGJJpbzUjAszn/CJ6AiEAxmvDjngRfZGjqEI0eilD9GaGItwMwmOqvzW43tpx6sY="}]},"_npmUser":{"name":"pasechnik","email":"vladimir.pasechnik@gmail.com","actor":{"name":"pasechnik","email":"vladimir.pasechnik@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"pasechnik","email":"vladimir.pasechnik@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/okta-zustand_0.4.0_1751247355494_0.3710429004996969"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-26T23:19:02.537Z","modified":"2025-06-30T01:35:55.856Z","0.1.0":"2025-06-26T23:19:02.867Z","0.2.0":"2025-06-29T16:45:24.460Z","0.2.1":"2025-06-29T19:25:10.905Z","0.3.0":"2025-06-29T20:49:44.740Z","0.4.0":"2025-06-30T01:35:55.665Z"},"bugs":{"url":"https://github.com/codecot/okta-zustand/issues"},"author":{"name":"Codecot"},"license":"MIT","homepage":"https://github.com/codecot/okta-zustand#readme","keywords":["okta","authentication","oauth","oidc","react","zustand","auth"],"repository":{"type":"git","url":"git+https://github.com/codecot/okta-zustand.git"},"description":"A modern Okta authentication library for React using Zustand state management","maintainers":[{"name":"pasechnik","email":"vladimir.pasechnik@gmail.com"}],"readme":"# @codecot/okta-zustand\n\nA modern Okta authentication library for React using Zustand state management. This library provides a complete replacement for `@okta/okta-react` with better performance, simpler API, and no Context API dependencies.\n\n## Features\n\n- 🚀 Built with Zustand for optimal performance\n- 🔐 Full OAuth 2.0 / OIDC support with PKCE\n- 🔄 Automatic token refresh\n- 💾 Flexible token storage (localStorage, sessionStorage, cookies)\n- 🎣 React hooks for easy integration\n- 🛡️ Protected route components\n- 🔁 Retry logic with exponential backoff\n- 📦 TypeScript support\n- 🎯 No Context API - works anywhere in your app\n- 🔒 Advanced route protection with group-based authorization\n- 📡 Cross-tab synchronization\n- 🎨 Multiple UI components for different use cases\n\n## Installation\n\n```bash\nnpm install @codecot/okta-zustand zustand react react-router-dom\n# or\nyarn add @codecot/okta-zustand zustand react react-router-dom\n```\n\n## Quick Start\n\n### 1. Initialize Okta\n\n```tsx\nimport { OktaProvider } from '@codecot/okta-zustand'\n\nconst oktaConfig = {\n  issuer: 'https://your-okta-domain/oauth2/default',\n  clientId: 'your-client-id',\n  redirectUri: window.location.origin + '/login/callback',\n  scopes: ['openid', 'profile', 'email'],\n  pkce: true,\n  tokenManager: {\n    autoRenew: true,\n    storage: 'localStorage'\n  }\n}\n\nfunction App() {\n  return (\n    <OktaProvider config={oktaConfig}>\n      <Router>\n        {/* Your app routes */}\n      </Router>\n    </OktaProvider>\n  )\n}\n```\n\n### 2. Setup Routes\n\n```tsx\nimport { SecureRoute, LoginCallback } from '@codecot/okta-zustand'\n\nfunction AppRoutes() {\n  return (\n    <Routes>\n      <Route path=\"/login/callback\" element={<LoginCallback />} />\n      <Route \n        path=\"/protected\" \n        element={\n          <SecureRoute>\n            <ProtectedPage />\n          </SecureRoute>\n        } \n      />\n      <Route path=\"/login\" element={<LoginPage />} />\n    </Routes>\n  )\n}\n```\n\n### 3. Use Authentication\n\n```tsx\nimport { useOktaAuth } from '@codecot/okta-zustand'\n\nfunction LoginPage() {\n  const { login, isAuthenticated } = useOktaAuth()\n\n  if (isAuthenticated) {\n    return <Navigate to=\"/protected\" />\n  }\n\n  return (\n    <button onClick={() => login()}>\n      Login with Okta\n    </button>\n  )\n}\n\nfunction UserProfile() {\n  const { user, logout, isLoading } = useOktaAuth()\n\n  if (isLoading) return <div>Loading...</div>\n\n  return (\n    <div>\n      <h1>Welcome {user?.name}!</h1>\n      <button onClick={() => logout()}>Logout</button>\n    </div>\n  )\n}\n```\n\n## Documentation\n\n- 📚 [**Component Documentation**](./COMPONENTS.md) - Comprehensive guide to all available components\n- 🏗️ [**Architecture Guide**](./ARCHITECTURE.md) - Deep dive into the library architecture\n- 🔄 [**Migration Guide**](./MIGRATION.md) - Migrating from @okta/okta-react\n\n## API Reference\n\n### Hooks\n\n#### `useOktaAuth()`\nMain hook for authentication operations.\n\n```tsx\nconst {\n  isAuthenticated,  // boolean\n  isLoading,       // boolean\n  user,            // OktaUser | null\n  tokens,          // OktaTokens | null\n  error,           // AuthError | null\n  login,           // (options?: LoginOptions) => Promise<void>\n  logout,          // (options?: LogoutOptions) => Promise<void>\n  handleRedirectCallback, // () => Promise<void>\n  refreshToken     // () => Promise<void>\n} = useOktaAuth()\n```\n\n#### `useAccessToken()`\nGet the current access token.\n\n```tsx\nconst accessToken = useAccessToken() // string | null\n```\n\n#### `useIdToken()`\nGet the current ID token.\n\n```tsx\nconst idToken = useIdToken() // string | null\n```\n\n#### `useOktaUser()`\nGet the current user information.\n\n```tsx\nconst user = useOktaUser() // OktaUser | null\n```\n\n#### `useUserInfo()`\nFetch detailed user information from the userinfo endpoint.\n\n```tsx\nconst { userInfo, loading, error } = useUserInfo()\n```\n\n### Components\n\n#### `<OktaProvider>`\nInitializes the Okta authentication system.\n\n```tsx\n<OktaProvider \n  config={oktaConfig} \n  onAuthRequired={() => console.log('Auth required')}\n>\n  {children}\n</OktaProvider>\n```\n\n#### `<SecureRoute>`\nProtects routes that require authentication.\n\n```tsx\n<SecureRoute \n  redirectTo=\"/login\"\n  loadingComponent={<CustomLoader />}\n>\n  <ProtectedContent />\n</SecureRoute>\n```\n\n#### `<LoginCallback>`\nHandles the OAuth callback after login.\n\n```tsx\n<LoginCallback \n  redirectTo=\"/dashboard\"\n  loadingComponent={<div>Authenticating...</div>}\n  errorComponent={(error) => <ErrorPage error={error} />}\n/>\n```\n\n#### `<AuthGuard>`\nConditionally renders content based on auth state.\n\n```tsx\n<AuthGuard \n  fallback={<LoginPrompt />}\n  loadingComponent={<Spinner />}\n>\n  <ProtectedContent />\n</AuthGuard>\n```\n\n### Higher-Order Components\n\n#### `withOktaAuth()`\nInjects auth props into components.\n\n```tsx\nconst EnhancedComponent = withOktaAuth(MyComponent, {\n  requireAuth: true,\n  redirectTo: '/login'\n})\n```\n\n## Advanced Usage\n\n### Custom Token Storage\n\n```tsx\nimport { TokenStorage } from '@codecot/okta-zustand'\n\nclass CustomStorage extends TokenStorage {\n  constructor() {\n    super('cookie', 'my-app-tokens')\n  }\n}\n\nconst oktaConfig = {\n  // ... other config\n  tokenManager: {\n    storage: new CustomStorage()\n  }\n}\n```\n\n### Error Handling\n\n```tsx\nimport { useOktaAuth, isAuthError, OktaAuthError } from '@codecot/okta-zustand'\n\nfunction LoginForm() {\n  const { login, error } = useOktaAuth()\n\n  const handleLogin = async () => {\n    try {\n      await login()\n    } catch (err) {\n      if (isAuthError(err)) {\n        console.error('Auth error:', err.errorCode, err.errorSummary)\n      }\n    }\n  }\n\n  return (\n    <>\n      {error && <div className=\"error\">{error.errorSummary}</div>}\n      <button onClick={handleLogin}>Login</button>\n    </>\n  )\n}\n```\n\n### Manual Token Management\n\n```tsx\nimport { useAuthStore } from '@codecot/okta-zustand'\n\nfunction TokenManager() {\n  const { tokens, refreshToken, setTokens } = useAuthStore()\n\n  const handleRefresh = async () => {\n    try {\n      await refreshToken()\n    } catch (error) {\n      console.error('Failed to refresh token:', error)\n    }\n  }\n\n  return (\n    <div>\n      <p>Access Token expires at: {new Date(tokens?.accessToken?.expiresAt * 1000).toLocaleString()}</p>\n      <button onClick={handleRefresh}>Refresh Token</button>\n    </div>\n  )\n}\n```\n\n### Using with Next.js\n\n```tsx\n// pages/_app.tsx\nimport { OktaProvider } from '@codecot/okta-zustand'\nimport { useRouter } from 'next/router'\n\nfunction MyApp({ Component, pageProps }) {\n  const router = useRouter()\n\n  const oktaConfig = {\n    issuer: process.env.NEXT_PUBLIC_OKTA_ISSUER,\n    clientId: process.env.NEXT_PUBLIC_OKTA_CLIENT_ID,\n    redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/api/auth/callback`,\n  }\n\n  return (\n    <OktaProvider \n      config={oktaConfig}\n      onAuthRequired={() => router.push('/login')}\n    >\n      <Component {...pageProps} />\n    </OktaProvider>\n  )\n}\n```\n\n## Configuration Options\n\n```typescript\ninterface OktaConfig {\n  // Required\n  issuer: string\n  clientId: string\n  redirectUri: string\n\n  // Optional\n  scopes?: string[]              // Default: ['openid', 'profile', 'email']\n  pkce?: boolean                 // Default: true\n  responseType?: string          // Default: 'code'\n  responseMode?: string          // Default: 'query'\n  postLogoutRedirectUri?: string\n  prompts?: string[]\n  display?: string\n  maxAge?: number\n  acrValues?: string\n\n  tokenManager?: {\n    autoRenew?: boolean          // Default: true\n    expireEarlySeconds?: number  // Default: 30\n    storage?: 'localStorage' | 'sessionStorage' | 'cookie'\n    storageKey?: string          // Default: 'okta-token-storage'\n  }\n}\n```\n\n## Migration from @okta/okta-react\n\n### 1. Replace the Security component:\n\n```tsx\n// Old\nimport { Security } from '@okta/okta-react'\n<Security oktaAuth={oktaAuth}>\n\n// New\nimport { OktaProvider } from '@codecot/okta-zustand'\n<OktaProvider config={oktaConfig}>\n```\n\n### 2. Replace SecureRoute:\n\n```tsx\n// Old\nimport { SecureRoute } from '@okta/okta-react'\n<SecureRoute path=\"/protected\" component={ProtectedComponent} />\n\n// New\nimport { SecureRoute } from '@codecot/okta-zustand'\n<Route path=\"/protected\" element={<SecureRoute><ProtectedComponent /></SecureRoute>} />\n```\n\n### 3. Replace useOktaAuth hook:\n\n```tsx\n// Old\nimport { useOktaAuth } from '@okta/okta-react'\nconst { oktaAuth, authState } = useOktaAuth()\n\n// New\nimport { useOktaAuth } from '@codecot/okta-zustand'\nconst { isAuthenticated, user, login, logout } = useOktaAuth()\n```\n\n## Browser Support\n\n- Chrome (latest)\n- Firefox (latest)\n- Safari (latest)\n- Edge (latest)\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Support\n\nFor issues and feature requests, please use the [GitHub issue tracker](https://github.com/codecot/okta-zustand/issues).","readmeFilename":"README.md"}