{"_id":"@boneybone/next-auth-server","name":"@boneybone/next-auth-server","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@boneybone/next-auth-server","version":"0.0.1","description":"The Auth.js Provider for Boneybone Auth Server","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","require":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc","test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"next-auth":"^4.0.0 || ^5.0.0"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.0.0"},"author":{"name":"Rizal","email":"rizal@boneybone.com"},"license":"ISC","_id":"@boneybone/next-auth-server@0.0.1","gitHead":"436b17f15eeb190706d165f2f1106d5fc1967be7","_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-p56+sYw7kFLMfqvkB8mI7a6i7g81mA2fjsJ03WhprD0wWHwYGin28ZJuXiqcrOWiQaGXqOl3f4/IamY00enSAQ==","shasum":"56960588cdd4b0f06377fe80262c279f04c929e5","tarball":"https://registry.npmjs.org/@boneybone/next-auth-server/-/next-auth-server-0.0.1.tgz","fileCount":4,"unpackedSize":3923,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFz2BStr3NIjeY/11n8DV8x5O2J6b+yY3a2yHGoK2bD/AiEAvPp62LecHC6/qrJxJ62f99Lg2HUfTieqjEMVw67G/kA="}]},"_npmUser":{"name":"boneybone","email":"developer@ixtelecom.net"},"directories":{},"maintainers":[{"name":"boneybone","email":"developer@ixtelecom.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/next-auth-server_0.0.1_1762075591828_0.37315259906389686"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-02T09:26:31.735Z","0.0.1":"2025-11-02T09:26:32.134Z","modified":"2025-11-02T09:26:32.500Z"},"maintainers":[{"name":"boneybone","email":"developer@ixtelecom.net"}],"description":"The Auth.js Provider for Boneybone Auth Server","author":{"name":"Rizal","email":"rizal@boneybone.com"},"license":"ISC","readme":"# Auth Server SDK\n\nThis is the Boneybone Auth Server SDK For Next.js or any frontend supported by Auth.js to use the BB Auth Server engine.\n\nTo use this SDK, you need to create an BB Auth Server Application to obtain the Client ID & Client Secret.\n\n## Installation\n\n```bash\nnpm install @boneybone/next-auth-server\n```\n\n## Setup\n\n### 1. Set the .env variables\n\nOnce you obtain a `clientId` and `clientSecret`, set it to the `.env` file as follows:\n\n```\nAUTH_SERVER_CLIENT_ID=\"YOUR CLIENT ID\"\nAUTH_SERVER_CLIENT_SECRET=\"YOUR CLIENT SECRET\"\nAUTH_SERVER_ENDPOINT=\"THE DOMAIN WHERE THE AUTH-SERVER WERE DEPLOYED\"\n```\n\n### 2. Configure NextAuth\n\nCreate or update your NextAuth configuration file:\n\n**App Router** (`app/api/auth/[...nextauth]/route.ts`):\n\n```typescript\nimport NextAuth from \"next-auth\";\nimport BoneyboneAuthServer from \"@boneybone/next-auth-server\";\n\nconst handler = NextAuth({\n  providers: [\n    BoneyboneAuthServer({\n      clientId: process.env.AUTH_SERVER_CLIENT_ID!,\n      clientSecret: process.env.AUTH_SERVER_CLIENT_SECRET!,\n      issuer: process.env.AUTH_SERVER_ENDPOINT!,\n    }),\n  ],\n});\n\nexport { handler as GET, handler as POST };\n```\n\n**Pages Router** (`pages/api/auth/[...nextauth].ts`):\n\n```typescript\nimport NextAuth from \"next-auth\";\nimport BoneyboneAuthServer from \"@boneybone/next-auth-server\";\n\nexport default NextAuth({\n  providers: [\n    BoneyboneAuthServer({\n      clientId: process.env.AUTH_SERVER_CLIENT_ID!,\n      clientSecret: process.env.AUTH_SERVER_CLIENT_SECRET!,\n      issuer: process.env.AUTH_SERVER_ENDPOINT!,\n    }),\n  ],\n});\n```\n\n### 3. Add Login Button\n\n```typescript\nimport { signIn } from \"next-auth/react\";\n\nexport default function LoginButton() {\n  return (\n    <button onClick={() => signIn(\"boneybone-auth-server\")}>Sign in</button>\n  );\n}\n```\n","readmeFilename":"README.md","_rev":"1-8c6400607369ad9f0074a7fd9e1a6986"}