{"id":26286366,"url":"https://github.com/l1ttps/nestjs-fingerprint","last_synced_at":"2025-04-05T09:04:49.206Z","repository":{"id":191534330,"uuid":"684871221","full_name":"l1ttps/nestjs-fingerprint","owner":"l1ttps","description":"Server-side fingerprinting library for framework NestJs ","archived":false,"fork":false,"pushed_at":"2025-03-27T14:45:24.000Z","size":1184,"stargazers_count":67,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T08:03:00.753Z","etag":null,"topics":["authentication","cookie","fingerprinting","nestjs"],"latest_commit_sha":null,"homepage":"https://nestjs-fingerprint.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/l1ttps.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}},"created_at":"2023-08-30T02:51:58.000Z","updated_at":"2025-03-27T14:45:21.000Z","dependencies_parsed_at":"2023-08-30T10:31:33.810Z","dependency_job_id":"b3887164-a7a5-4d2b-a3ef-c1c3434de418","html_url":"https://github.com/l1ttps/nestjs-fingerprint","commit_stats":null,"previous_names":["l1ttps/nestjs-fingerprint"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1ttps%2Fnestjs-fingerprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1ttps%2Fnestjs-fingerprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1ttps%2Fnestjs-fingerprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1ttps%2Fnestjs-fingerprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l1ttps","download_url":"https://codeload.github.com/l1ttps/nestjs-fingerprint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312068,"owners_count":20918344,"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","cookie","fingerprinting","nestjs"],"created_at":"2025-03-14T20:21:54.086Z","updated_at":"2025-04-05T09:04:49.160Z","avatar_url":"https://github.com/l1ttps.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/l1ttps/nestjs-fingerprint/blob/main/docs/banner.png?raw=true\" alt=\"Nestjs Fingerprint\"/\u003e\n\u003c/p\u003e\n\n[![NPM](https://img.shields.io/npm/v/nestjs-fingerprint.svg)](https://www.npmjs.com/package/nestjs-fingerprint)\n[![NPM](https://img.shields.io/npm/dm/nestjs-fingerprint.svg)](https://www.npmjs.com/package/nestjs-fingerprint)\n\n**Server-side fingerprinting library for framework NestJs**\n\n## Features\n- Generate fingerprint for each browser or device\n- Function decorator support\n- Auto set cookie\n\n## Installation\n\n``` \nnpm install --save nestjs-fingerprint\n\nor\n\nyarn add nestjs-fingerprint\n```\n\n## Usage\napp.module.ts\n```typescript\nimport { Module } from '@nestjs/common';\nimport { NestjsFingerprintModule } from 'nestjs-fingerprint';\nimport { AppController } from './app.controller';\nimport { AppService } from './app.service';\n\n@Module({\n  imports: [\n    NestjsFingerprintModule.forRoot({\n      params: ['headers', 'userAgent', 'ipAddress'],\n      cookieOptions: {\n        name: 'your_cookie_name', // optional\n        httpOnly: true, // optional\n      },\n    }),\n  ],\n  controllers: [AppController],\n  providers: [AppService],\n})\n\nexport class AppModule {}\n```\n\napp.controller.ts\n```typescript\nimport { Controller, Get } from '@nestjs/common';\nimport { Fingerprint, IFingerprint, RealIp } from 'nestjs-fingerprint';\n\n@Controller()\nexport class AppController {\n\n  @Get()\n  getFingerprint(@Fingerprint() fp: IFingerprint): IFingerprint {\n    return fp;\n  }\n\n  @Get('my-ip-address')\n  getMyIpAddress(@RealIp() ipAddress: string): string {\n    return ipAddress;\n  }\n}\n\n```\n\nFingerprint example: \n```json\n{\n  \"id\": \"79c0678d8672fafb932a97a1368d7bf3\",\n  \"headers\": {\n    \"accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\",\n    \"language\": \"en-US,en;q=0.9\"\n  },\n  \"userAgent\": {\n    \"browser\": {\n      \"family\": \"Chrome\",\n      \"version\": \"xxx\"\n    },\n    \"device\": {\n      \"family\": \"Other\",\n      \"version\": \"0\"\n    },\n    \"os\": {\n      \"family\": \"Windows\",\n      \"major\": \"10\",\n      \"minor\": \"0\"\n    }\n  },\n  \"ipAddress\": {\n    \"value\": \"xxx.xxx.xxx.xxx\"\n  }\n}\n```\n* [Go](https://github.com/anhnmt/go-fingerprint)\n## License\n\nMIT © [l1ttps](https://github.com/l1ttps)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl1ttps%2Fnestjs-fingerprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl1ttps%2Fnestjs-fingerprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl1ttps%2Fnestjs-fingerprint/lists"}