{"id":31616898,"url":"https://github.com/jimmycamus/nestjs-auth0","last_synced_at":"2026-01-20T17:31:21.398Z","repository":{"id":313840303,"uuid":"1053095042","full_name":"JimmyCamus/nestjs-auth0","owner":"JimmyCamus","description":"Auth0 integration for NestJS applications.","archived":false,"fork":false,"pushed_at":"2025-09-09T02:41:18.000Z","size":115,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-27T00:44:21.084Z","etag":null,"topics":["auth0","nestjs","npm-package"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@jimmycamus/nestjs-auth0","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/JimmyCamus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-09T01:39:01.000Z","updated_at":"2025-09-09T02:41:22.000Z","dependencies_parsed_at":"2025-09-09T04:56:15.168Z","dependency_job_id":"164cfe12-5dd7-4b52-b2c5-ccc93fc2a562","html_url":"https://github.com/JimmyCamus/nestjs-auth0","commit_stats":null,"previous_names":["jimmycamus/nestjs-auth0"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JimmyCamus/nestjs-auth0","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyCamus%2Fnestjs-auth0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyCamus%2Fnestjs-auth0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyCamus%2Fnestjs-auth0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyCamus%2Fnestjs-auth0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JimmyCamus","download_url":"https://codeload.github.com/JimmyCamus/nestjs-auth0/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyCamus%2Fnestjs-auth0/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278608207,"owners_count":26014924,"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-06T02:00:05.630Z","response_time":65,"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":["auth0","nestjs","npm-package"],"created_at":"2025-10-06T12:18:53.627Z","updated_at":"2025-10-06T12:18:58.469Z","avatar_url":"https://github.com/JimmyCamus.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg width=\"200\" height=\"200\" src=\"https://github.com/user-attachments/assets/45a27923-9073-47c6-b963-cdbc72cd2c6c\" /\u003e\n\u003ch1\u003e@jimmycamus/nestjs-auth0\u003c/h1\u003e\n  \n\u003cp\u003eSimple authentication and authorization for NestJS applications using Auth0. This package provides modules, decorators, and utilities to seamlessly integrate Auth0's OAuth2 flow into your controllers, handle callbacks, and access authenticated user data in a secure and transparent way. Ideal for projects that require social login, JWT, and user management with Auth0 in NestJS.\u003c/p\u003e\n\u003c/div\u003e\n\n## Installation\n\n```bash\npnpm add  @jimmycamus/nestjs-auth0\n```\n\n## Basic Usage\n\n```typescript\nimport { Module } from \"@nestjs/common\";\nimport { Auth0Module } from \"@jimmycamus/nestjs-auth0\";\n\n@Module({\n  imports: [\n    Auth0Module.forRoot({\n      domain: \"YOUR_AUTH0_DOMAIN\",\n      clientId: \"YOUR_AUTH0_CLIENT_ID\",\n      clientSecret: \"YOUR_AUTH0_CLIENT_SECRET\",\n      redirectUri: \"YOUR_AUTH0_REDIRECT_URI\",\n    }),\n  ],\n})\nexport class AppModule {}\n```\n\n## Asynchronous Configuration\n\n```typescript\nAuth0Module.forRootAsync({\n  useFactory: async () =\u003e ({\n    domain: process.env.AUTH0_DOMAIN,\n    clientId: process.env.AUTH0_CLIENT_ID,\n    clientSecret: process.env.AUTH0_CLIENT_SECRET,\n    redirectUri: process.env.AUTH0_REDIRECT_URI,\n  }),\n});\n```\n\n## Using Decorators\n\nThis package provides decorators to simplify Auth0 integration inside your NestJS controllers.\n\n`@Auth0Login()`\n\nRedirects the user to the Auth0 login page.\nYou don’t need to implement any logic in the handler — the interceptor will handle the redirection.\n\n```typescript\nimport { Controller, Get } from \"@nestjs/common\";\nimport { Auth0Login } from \"@jimmycamus/nestjs-auth0\";\n\n@Controller()\nexport class AppController {\n  @Get(\"authorize\")\n  @Auth0Login()\n  authorize() {\n    // No logic needed here, user will be redirected to Auth0\n  }\n}\n```\n\n`@Auth0Callback()`\n\nHandles the Auth0 callback after login.\nThis decorator will:\n\n- Process the Auth0 callback.\n- Exchange the authorization code for an access token.\n- Attach the authenticated user to the request object.\n\n```typescript\nimport { Controller, Get, Req } from \"@nestjs/common\";\nimport { Request } from \"express\";\nimport { Auth0Callback, WithAuth0User } from \"@jimmycamus/nestjs-auth0\";\n\n@Controller()\nexport class AppController {\n  @Get(\"callback\")\n  @Auth0Callback()\n  callback(@Req() req: WithAuth0User\u003cRequest\u003e) {\n    return { userData: req.user };\n  }\n}\n```\n\n### Combined Example\n\n```typescript\nimport { Controller, Get, Req } from \"@nestjs/common\";\nimport {\n  Auth0Callback,\n  Auth0Login,\n  WithAuth0User,\n} from \"@jimmycamus/nestjs-auth0\";\nimport { Request } from \"express\";\n\n@Controller()\nexport class ExampleController {\n  constructor() {}\n\n  @Get(\"authorize\")\n  @Auth0Login()\n  authorize() {}\n\n  @Get(\"callback\")\n  @Auth0Callback()\n  callback(@Req() req: WithAuth0User\u003cRequest\u003e) {\n    return { userData: req.user };\n  }\n}\n```\n\n## Contributing\n\nContributions are welcome!\nOpen an issue or a PR to suggest new features and improvements.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmycamus%2Fnestjs-auth0","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimmycamus%2Fnestjs-auth0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmycamus%2Fnestjs-auth0/lists"}