{"_id":"@akira-io/core-auth-kit","_rev":"3-b52db8227e3cf0fdb19fcd80d9afd1c9","name":"@akira-io/core-auth-kit","dist-tags":{"latest":"2.2.2"},"versions":{"2.2.1":{"name":"@akira-io/core-auth-kit","version":"2.2.1","keywords":["nextjs","auth","authentication","ui","shadcn","react","typescript"],"license":"MIT","_id":"@akira-io/core-auth-kit@2.2.1","maintainers":[{"name":"liedsonc","email":"liedsoncanal@gmail.com"},{"name":"kidiatoliny","email":"kidiatoliny@gmail.com"}],"homepage":"https://github.com/liedsonc/core-auth-kit#readme","bugs":{"url":"https://github.com/liedsonc/core-auth-kit/issues"},"bin":{"core-auth-kit":"bin/init.js"},"dist":{"shasum":"5685669c7d6722f4610ef56f30c9e5487590f189","tarball":"https://registry.npmjs.org/@akira-io/core-auth-kit/-/core-auth-kit-2.2.1.tgz","fileCount":107,"integrity":"sha512-9FetRFOrTDUFal3jCCuoclnVqZca0YQhbArTxtHVuxaEnkLh+gDxla/zj6YhHpCZgUjViVNyv3nmFd/jTwSBhg==","signatures":[{"sig":"MEQCIGsaBLMUDrnx4EAwfiALJ3Io2ysvxLiC0aJDs2NGCUj7AiB/BUe3BWoKujIT4AVl5/Z7y8ogZHB6a9fWgVzciQgjRw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":174138},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./styles":"./styles/index.css"},"gitHead":"ade301c27dc8bab69292506da48141ab11615905","scripts":{"build":"tsc -p tsconfig.build.json","publish":"npm publish --access public","type-check":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"liedsonc","email":"liedsoncanal@gmail.com"},"repository":{"url":"git+https://github.com/liedsonc/core-auth-kit.git","type":"git","directory":"auth-ui"},"_npmVersion":"10.9.3","description":"Production-ready authentication UI package for Next.js App Router","directories":{},"_nodeVersion":"22.19.0","dependencies":{"clsx":"^2.1.1","lucide-react":"^0.460.0","tailwind-merge":"^2.5.0","@radix-ui/react-slot":"^1.1.0","@radix-ui/react-label":"^2.1.0","class-variance-authority":"^0.7.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0","@types/react":"^19.0.0"},"peerDependencies":{"next":"^15.0.0","react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core-auth-kit_2.2.1_1771885135030_0.2416926483861248","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@akira-io/core-auth-kit","version":"2.2.0","keywords":["nextjs","auth","authentication","ui","shadcn","react","typescript"],"license":"MIT","_id":"@akira-io/core-auth-kit@2.2.0","maintainers":[{"name":"liedsonc","email":"liedsoncanal@gmail.com"},{"name":"kidiatoliny","email":"kidiatoliny@gmail.com"}],"homepage":"https://github.com/liedsonc/core-auth-kit#readme","bugs":{"url":"https://github.com/liedsonc/core-auth-kit/issues"},"bin":{"core-auth-kit":"bin/init.js"},"dist":{"shasum":"f3899a714d60ce2cd188dc5d6a2bb0c1349848dc","tarball":"https://registry.npmjs.org/@akira-io/core-auth-kit/-/core-auth-kit-2.2.0.tgz","fileCount":107,"integrity":"sha512-ojrt2QzszHpralNS/zWZfIHVZX3yp2lOZyQVYNG30nWewPgGxzcEWdCuGByYdth9j1Gog9RfoKFt0wuLj9a6rw==","signatures":[{"sig":"MEUCIQDBpeAL4pIIj9KAtBs943rfeBZt90tuFxebuAQS6bWpKwIgczEduZ09b46g/vDRp2P3vlEZY3Xgnye3ayemJSBwdcI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":174138},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./styles":"./styles/index.css"},"gitHead":"ade301c27dc8bab69292506da48141ab11615905","scripts":{"build":"tsc -p tsconfig.build.json","publish":"npm publish --access public","type-check":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"liedsonc","email":"liedsoncanal@gmail.com"},"repository":{"url":"git+https://github.com/liedsonc/core-auth-kit.git","type":"git","directory":"auth-ui"},"_npmVersion":"10.9.3","description":"Production-ready authentication UI package for Next.js App Router","directories":{},"_nodeVersion":"22.19.0","dependencies":{"clsx":"^2.1.1","lucide-react":"^0.460.0","tailwind-merge":"^2.5.0","@radix-ui/react-slot":"^1.1.0","@radix-ui/react-label":"^2.1.0","class-variance-authority":"^0.7.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0","@types/react":"^19.0.0"},"peerDependencies":{"next":"^15.0.0","react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core-auth-kit_2.2.0_1771885238855_0.767754572642734","host":"s3://npm-registry-packages-npm-production"}},"2.2.2":{"name":"@akira-io/core-auth-kit","version":"2.2.2","description":"Production-ready authentication UI package for Next.js App Router","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./styles":"./styles/index.css"},"bin":{"core-auth-kit":"bin/init.js"},"scripts":{"build":"tsc -p tsconfig.build.json","type-check":"tsc --noEmit","publish":"npm publish --access public","prepublishOnly":"npm run build"},"dependencies":{"@radix-ui/react-label":"^2.1.0","@radix-ui/react-slot":"^1.1.0","class-variance-authority":"^0.7.0","clsx":"^2.1.1","tailwind-merge":"^2.5.0","lucide-react":"^0.460.0"},"peerDependencies":{"next":"^15.0.0","react":"^19.0.0","react-dom":"^19.0.0"},"devDependencies":{"@types/react":"^19.0.0","typescript":"^5.6.0"},"keywords":["nextjs","auth","authentication","ui","shadcn","react","typescript"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/liedsonc/core-auth-kit.git","directory":"auth-ui"},"bugs":{"url":"https://github.com/liedsonc/core-auth-kit/issues"},"homepage":"https://github.com/liedsonc/core-auth-kit#readme","_id":"@akira-io/core-auth-kit@2.2.2","gitHead":"4cb0c663f64f4ae21b8bdfa4725de843f39c52d7","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-ePHauqUML7ad/hGjWirdTpbEI/0kcLrnoQuEZgnAQK3fRUJpRi7/xaHOYJyjT1EzCO0KTNmyfgFA11SLbV3vMg==","shasum":"22e9d1792c53afd5e8e14b4e93cab05ce0f073d7","tarball":"https://registry.npmjs.org/@akira-io/core-auth-kit/-/core-auth-kit-2.2.2.tgz","fileCount":107,"unpackedSize":128799,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDcsNDVMIGakS1zSf7Xp4EBRD+47nQsofdG8CXT/eLHVgIhAJVHfPshF3pxNVBnT3LwnI6jshTs4j1BvEFa/BkfRfkn"}]},"_npmUser":{"name":"liedsonc","email":"liedsoncanal@gmail.com"},"directories":{},"maintainers":[{"name":"liedsonc","email":"liedsoncanal@gmail.com"},{"name":"kidiatoliny","email":"kidiatoliny@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core-auth-kit_2.2.2_1771885937508_0.0018462839748361048"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-23T22:18:54.937Z","modified":"2026-02-23T22:32:17.875Z","2.2.1":"2026-02-23T22:18:55.246Z","2.2.0":"2026-02-23T22:20:39.004Z","2.2.2":"2026-02-23T22:32:17.691Z"},"bugs":{"url":"https://github.com/liedsonc/core-auth-kit/issues"},"license":"MIT","homepage":"https://github.com/liedsonc/core-auth-kit#readme","keywords":["nextjs","auth","authentication","ui","shadcn","react","typescript"],"repository":{"type":"git","url":"git+https://github.com/liedsonc/core-auth-kit.git","directory":"auth-ui"},"description":"Production-ready authentication UI package for Next.js App Router","maintainers":[{"name":"liedsonc","email":"liedsoncanal@gmail.com"},{"name":"kidiatoliny","email":"kidiatoliny@gmail.com"}],"readme":"# @liedsonc/core-auth-kit\r\n\r\nAuthentication UI for Next.js: login, register, forgot password, reset password, and email verification. Built with shadcn-style components and Tailwind. One command to scaffold pages and wire OAuth and email (Resend). Customize via config and your own backend.\r\n\r\n**For detailed documentation** (environment variables, API reference, AuthClient and email examples, customization, production) see [docs/README.md](docs/README.md).\r\n\r\n## Features\r\n\r\n- Complete auth flows: Login, Register, Forgot Password, Reset Password, Email Verification\r\n- shadcn-style UI, themeable and accessible\r\n- Backend agnostic: implement `AuthClient` for your API or provider\r\n- OAuth (Google, Apple) via environment variables\r\n- Optional email templates (Resend) for verification and password reset\r\n- Customizable: logo, layout, redirects, form order, or use components individually\r\n\r\n## Installation\r\n\r\nFrom your Next.js app root:\r\n\r\n```bash\r\nnpx @liedsonc/core-auth-kit init\r\n```\r\n\r\nOr install only: `npm install @liedsonc/core-auth-kit`. Peer deps: `next` ^15, `react` ^19, `react-dom` ^19. The package brings its own UI deps (Radix, CVA, clsx, tailwind-merge). No Resend npm package required; the scaffolded email helper uses Resend’s HTTP API.\r\n\r\n**Styles:** Add the package to Tailwind `content` and import in your root layout:\r\n\r\n```ts\r\ncontent: [\"./app/**/*.{js,ts,jsx,tsx,mdx}\", \"./node_modules/@liedsonc/core-auth-kit/**/*.{js,ts,jsx,tsx}\"]\r\n```\r\n\r\n```tsx\r\nimport \"@liedsonc/core-auth-kit/styles\";\r\n```\r\n\r\n## Plug and Play\r\n\r\n```bash\r\nnpx @liedsonc/core-auth-kit init\r\n```\r\n\r\nInstalls the package if needed, optionally sets up shadcn (button, input, card, label), and scaffolds auth pages and API route stubs. Use `--no-shadcn` to use the package’s built-in components only. Use `--force` to overwrite existing files.\r\n\r\n**Next steps:**\r\n\r\n1. Implement `lib/auth-client.ts` with your backend (or API routes).\r\n2. Copy `.env.example` to `.env.local` and set variables. See [docs](docs/README.md#environment-variables) for the full list.\r\n3. Implement API routes under `app/api/auth/` if your client calls them; use `lib/email-templates.ts` in register and forgot-password for emails.\r\n4. Ensure Tailwind content includes the package and you import `@liedsonc/core-auth-kit/styles` in the root layout.\r\n\r\nAuth routes: `/login`, `/register`, `/forgot-password`, `/reset-password`, `/verify-email`.\r\n\r\n### Scaffolded files\r\n\r\n| Path | Purpose |\r\n|------|---------|\r\n| `app/(auth)/layout.tsx` | AuthUIProvider and config |\r\n| `app/(auth)/login/page.tsx` etc. | Full page source; edit copy/layout as needed |\r\n| `lib/auth-config.ts` | AuthUIConfig (authClient, OAuth, redirects) |\r\n| `lib/auth-client.ts` | **Replace with your backend** |\r\n| `lib/email-templates.ts` | Verification/reset email copy and `sendEmail`; edit to customize |\r\n| `.env.example` | Copy to `.env.local` |\r\n| `app/api/auth/*/route.ts` | Stubs; implement and call your backend |\r\n\r\n## Environment Variables\r\n\r\nCopy `.env.example` to `.env.local`. Main options: app URL, redirects after login/register/reset, OAuth Google/Apple (enabled, client ID, redirect URI, client secret), Resend (API key, from email/name), app name. See [docs](docs/README.md#environment-variables) for the full reference.\r\n\r\n## Quick Start\r\n\r\nAfter init, replace the stub in `lib/auth-client.ts` with your backend. If you use `/api/auth/*`, implement those route handlers. See the [documentation](docs/README.md#quick-start-detailed) for a full AuthClient example and provider setup.\r\n\r\n## Email\r\n\r\nInit adds `lib/email-templates.ts` with default verification and password-reset copy and a `sendEmail` helper. Use it from your register and forgot-password API routes; edit the file to change subject and HTML. See [docs](docs/README.md#email-integration-with-resend) for Resend setup and code.\r\n\r\n## API Reference\r\n\r\n**Pages:** LoginPage, RegisterPage, ForgotPasswordPage, ResetPasswordPage, VerifyEmailPage.\r\n\r\n**Components:** AuthCard, AuthForm, FormField, PasswordInput, OAuthButtons, ErrorMessage, SuccessMessage, LoadingSpinner.\r\n\r\n**Hooks:** useAuth(), useOAuth(onRedirect).\r\n\r\nFor full types and signatures see the [documentation](docs/README.md#api-reference).\r\n\r\n## Customization\r\n\r\n- Logo, OAuth (env), layout (centered vs split), redirects, form order (email first or OAuth first), terms/privacy URLs.\r\n- Use individual components to build custom pages.\r\n\r\nSee [docs](docs/README.md#customization) for code examples.\r\n\r\n## More\r\n\r\n**Production:** Set env for production, configure OAuth in provider consoles, build and deploy. See [docs](docs/README.md#production-setup).\r\n\r\n**Styling:** Tailwind and shadcn conventions; customize via CSS variables. See [docs](docs/README.md#styling).\r\n\r\n**Security:** No user enumeration in errors; implement CSRF, rate limiting, and secure tokens in your backend. See [docs](docs/README.md#security-considerations).\r\n\r\n**Browser support:** Chrome, Firefox, Safari, Edge (latest).\r\n\r\n## Contributing\r\n\r\nContributions are welcome. Please read our contributing guidelines first.\r\n\r\n## License\r\n\r\nMIT\r\n\r\n## Support\r\n\r\nOpen an issue on GitHub for issues or questions.\r\n","readmeFilename":"README.md"}