{"id":15315739,"url":"https://github.com/wobsoriano/fastify-next-auth","last_synced_at":"2025-10-11T13:39:38.992Z","repository":{"id":41128276,"uuid":"496406423","full_name":"wobsoriano/fastify-next-auth","owner":"wobsoriano","description":"Auth.js plugin for Fastify.","archived":false,"fork":false,"pushed_at":"2023-08-07T16:58:19.000Z","size":483,"stargazers_count":50,"open_issues_count":6,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-05T12:06:24.182Z","etag":null,"topics":["authentication","fastify","fastify-plugin","next-auth","oauth"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wobsoriano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-25T22:20:16.000Z","updated_at":"2025-04-23T21:52:32.000Z","dependencies_parsed_at":"2024-10-22T22:26:58.500Z","dependency_job_id":null,"html_url":"https://github.com/wobsoriano/fastify-next-auth","commit_stats":{"total_commits":145,"total_committers":2,"mean_commits":72.5,"dds":0.006896551724137945,"last_synced_commit":"1787e806aac4c03ebf7c3d51e6f9c310912783e4"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/wobsoriano/fastify-next-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Ffastify-next-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Ffastify-next-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Ffastify-next-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Ffastify-next-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wobsoriano","download_url":"https://codeload.github.com/wobsoriano/fastify-next-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Ffastify-next-auth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260148391,"owners_count":22965912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","fastify","fastify-plugin","next-auth","oauth"],"created_at":"2024-10-01T08:51:54.514Z","updated_at":"2025-10-11T13:39:38.940Z","avatar_url":"https://github.com/wobsoriano.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastify-next-auth\n\nAuthentication plugin for Fastify, powered by [Auth.js](https://authjs.dev/).\n\n## Installation\n\n```bash\nnpm install @auth/core fastify-next-auth\n```\n\n## Usage\n\n```ts\nimport fastify from 'fastify'\nimport AppleProvider from '@auth/core/providers/apple'\nimport GoogleProvider from '@auth/core/providers/google'\nimport EmailProvider from '@auth/core/providers/email'\nimport AuthPlugin from 'fastify-next-auth'\n\nconst app = fastify()\n\napp\n  .register(AuthPlugin, {\n    secret: process.env.AUTH_SECRET,\n    trustHost: process.env.AUTH_TRUST_HOST,\n    providers: [\n      // OAuth authentication providers\n      AppleProvider({\n        clientId: process.env.APPLE_ID,\n        clientSecret: process.env.APPLE_SECRET,\n      }),\n      GoogleProvider({\n        clientId: process.env.GOOGLE_ID,\n        clientSecret: process.env.GOOGLE_SECRET,\n      }),\n      // Sign in with passwordless email link\n      EmailProvider({\n        server: process.env.MAIL_SERVER,\n        from: '\u003cno-reply@example.com\u003e',\n      }),\n    ],\n  })\n```\n\n\u003cb\u003eClient Side Functions\u003c/b\u003e\n\n```ts\nimport { signIn, signOut } from 'fastify-next-auth/client'\n\n// Redirects to sign in page\nsignIn()\n\n// Starts OAuth sign-in flow\nsignIn('google')\n\n// Starts Email sign-in flow\nsignIn('email', { email: 'hello@mail.com' })\n\nsignOut()\n```\n\n\u003cb\u003eDecorators\u003c/b\u003e\n\n```ts\nfastify.get('/api/user', async function (req) {\n  const { user } = await this.getSession(req)\n  return user\n})\n```\n\nFor more info, proceed to the [Auth.js](https://authjs.dev/) docs.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwobsoriano%2Ffastify-next-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwobsoriano%2Ffastify-next-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwobsoriano%2Ffastify-next-auth/lists"}