https://github.com/tobycm/loginfc
Login with NFC tags xddd
https://github.com/tobycm/loginfc
linux nfc nodejs pcsc security ubuntu
Last synced: about 1 year ago
JSON representation
Login with NFC tags xddd
- Host: GitHub
- URL: https://github.com/tobycm/loginfc
- Owner: tobycm
- License: mit
- Created: 2024-07-17T06:01:09.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-18T00:19:04.000Z (over 1 year ago)
- Last Synced: 2025-03-17T15:06:47.747Z (about 1 year ago)
- Topics: linux, nfc, nodejs, pcsc, security, ubuntu
- Language: TypeScript
- Homepage:
- Size: 2.55 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/tobycm/loginfc)
# loginfc
Login with NFC tags xddd
Demo: https://www.youtube.com/watch?v=sH1NHUF4jtQ
## Installation
### Prerequisites
- NodeJS
- npm (or pnpm)
- NFC card reader/writer
- NFC card
- pcsc
### 1. Install dependencies
```sh {"id":"01J6NBCGD21GEH0ZM3FS70D7MN"}
npm install
```
or
```sh {"id":"01J6NBCGD3F5MJNPNHYJ4NWCVF"}
pnpm install
```
### 2. Generate a new key
```sh {"id":"01J6NBCGD3F5MJNPNHYJH4KSBH"}
npm run genkey
```
(or pnpm)
### 3. Write key to card
```sh {"id":"01J6NBCGD3F5MJNPNHYM6ARKFG"}
npm run writekey
```
Tap key to NFC card writer
Delete the key after successful write
### 4. Add key hash and username to `users.ts`
Add a new array element
Current:
```typescript {"id":"01J6NBFYCXEEHRKTCMTV6P1YQH"}
const users: Map = new Map([
["50ab5dd29f686c5ca8802bfd912f97f06992c0cd63a1bdec59ae7f244a81d9de29916af0552205cf2ede408fb014436ee003f876c186b581a25e381665637482", "toby"], //
]);
```
After:
```typescript {"id":"01J6NBH46XMR80CPCEPHJKWJCQ"}
const users: Map = new Map([
["50ab5dd29f686c5ca8802bfd912f97f06992c0cd63a1bdec59ae7f244a81d9de29916af0552205cf2ede408fb014436ee003f876c186b581a25e381665637482", "toby"], //
["your_hash_here", "your_username_here"],
]);
```
### 5. Start the listener
```sh {"id":"01J6NBCGD3F5MJNPNHYQ044DVH"}
npm run start
```
### 5. Enjoy :D