Skip to content

Latest commit

 

History

History
76 lines (50 loc) · 1.38 KB

File metadata and controls

76 lines (50 loc) · 1.38 KB

loginfc banner

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

npm install

or

pnpm install

2. Generate a new key

npm run genkey

(or pnpm)

3. Write key to card

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:

const users: Map<Hash, Username> = new Map([
  ["50ab5dd29f686c5ca8802bfd912f97f06992c0cd63a1bdec59ae7f244a81d9de29916af0552205cf2ede408fb014436ee003f876c186b581a25e381665637482", "toby"], //
]);

After:

const users: Map<Hash, Username> = new Map([
  ["50ab5dd29f686c5ca8802bfd912f97f06992c0cd63a1bdec59ae7f244a81d9de29916af0552205cf2ede408fb014436ee003f876c186b581a25e381665637482", "toby"], //
  ["your_hash_here", "your_username_here"],
]);

5. Start the listener

npm run start

5. Enjoy :D