{"id":20610317,"url":"https://github.com/itszavier/fluidauth-express","last_synced_at":"2026-02-16T11:08:13.938Z","repository":{"id":254635664,"uuid":"841203851","full_name":"itszavier/fluidauth-express","owner":"itszavier","description":"fluidauth-express makes adding authentication to your Express app easy. Follow these steps to get started quickly.","archived":false,"fork":false,"pushed_at":"2024-10-12T14:45:35.000Z","size":252,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-30T20:42:41.044Z","etag":null,"topics":["authentication","authentication-backend","authentication-middleware","express-authentication","expressjs"],"latest_commit_sha":null,"homepage":"https://fluidauth.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itszavier.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-11T23:02:51.000Z","updated_at":"2024-10-02T22:56:12.000Z","dependencies_parsed_at":"2024-08-24T23:30:14.331Z","dependency_job_id":"000b76e9-f7b7-4329-8fbe-925c04b46a53","html_url":"https://github.com/itszavier/fluidauth-express","commit_stats":null,"previous_names":["itszavier/fluidauth-express"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/itszavier/fluidauth-express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itszavier%2Ffluidauth-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itszavier%2Ffluidauth-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itszavier%2Ffluidauth-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itszavier%2Ffluidauth-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itszavier","download_url":"https://codeload.github.com/itszavier/fluidauth-express/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itszavier%2Ffluidauth-express/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278358491,"owners_count":25973950,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","authentication-backend","authentication-middleware","express-authentication","expressjs"],"created_at":"2024-11-16T10:16:20.274Z","updated_at":"2025-10-04T19:03:55.969Z","avatar_url":"https://github.com/itszavier.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fluid Auth Express\n\nfluidauth-express makes adding authentication to your Express app easy. Follow these steps to get started quickly.\n\n\n## Documentation\n\nFor a comprehensive guide on using FluidAuth Express, including installation, setup, and API reference, please visit the official documentation:\n\n[FluidAuth Documentation](https://fluidauth.vercel.app/)\n\n### Key Points\n\n- **Body Parser Required**: You need to use `body-parser` to handle request data.\n- **Cookie Parser Required**: You need to use `cookie-parser` to handle cookies.\n\n- **Initialize Middleware**: Use `authService.initialize()` after setting up the session middleware to configure necessary helper functions.\n\n\n## Quick Start\n\n```js\n// Import GithubProvider from FluidAuth-Express\nconst { GithubProvider } = require(\"@fluidauth/express/providers\");\n\n// Initialize GitHub provider with credentials\nconst Github = new GithubProvider({\n  credential: {\n    clientId: \"your-client-id\",\n    clientSecret: \"your-client-secret\",\n    redirectUri: \"your-redirect-uri\",\n  },\n  async verifyUser(data) {\n    const user = await findUserByEmail(data.email);\n    return user ? { user } : { user: null, info: { message: \"User not found\" } };\n  }\n});\n```\n\n```js\n// Express server setup\nconst express = require('express');\nconst cookieParser = require('cookie-parser');\nconst { AuthService, Session } = require('@fluidauth/express');\n\nconst app = express();\nconst authService = new AuthService({\n  providers: [Github],\n  session: new Session({ secret: \"your-session-secret\" }),\n  redirect: { onLoginSuccess: \"/dashboard\" },\n});\n\napp.use(express.json());\napp.use(cookieParser());\napp.use(authService.session());\napp.use(authService.initialize());\n\napp.listen(3000, () =\u003e console.log(\"Server running on port 3000\"));\n```\n\n## Module Support\n\nFluidAuth Express supports both CommonJS and ES Modules, allowing flexibility in how you import the package.\n\n### CommonJS\n\nIf you're using CommonJS, you can require the package like this:\n\n```javascript\nconst { AuthService } = require(\"@fluidauth/express\");\n```\n\n### ES Modules\n\nFor projects using ES Modules, you can import the package like this:\n\n```javascript\nimport { AuthService } from \"@fluidauth/express\";\n```\n\nBoth module systems are fully supported to ensure compatibility with various environments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitszavier%2Ffluidauth-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitszavier%2Ffluidauth-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitszavier%2Ffluidauth-express/lists"}