Skip to content

A PIN unlocks, a password authenticates, and the shop knows the phone - #138

Merged
sridharkalaibala merged 1 commit into
mainfrom
feat/a-pin-unlocks-a-password-authenticates
Sep 18, 2026
Merged

sridharkalaibala merged 1 commit into
mainfrom
feat/a-pin-unlocks-a-password-authenticates

Conversation

@sridharkalaibala

Copy link
Copy Markdown
Contributor

Owner: "remember the password and have simple auth. i think we already have module of lock i think find that re use."

The till has one, called Till PIN Lock, and its rule is the title of this branch: a PIN unlocks, a password authenticates. The code could not be reused. The till's PIN lives in pin-lock.json on that machine, encrypted with an install secret, and never leaves the main process, which is right for a till and means a handset needs its own. The rule is what came across.

The typing was the token, and that is already fixed

A handset credential lasted 24 hours, so a part-time waiter who does not know the shop's password needed a manager at the start of every service. A phone now stays signed in for thirty days (POS, merged).

Which is what this is for

A phone signed in for a month is a phone anybody who picks it up can take orders on. The answer is not to ask for the password again, which is where this started. It is four digits.

assets/common/lock.js the whole thing: keypad, hash and salt, five tries
assets/index/script.js asks at boot when there is a session to resume, and offers to set one once, after a sign-in that worked
kot-management.html and from the sheet on the floor screen, for the phones already signed in

Off unless somebody turns it on. An update must never start demanding a number nobody has been given, on a phone somebody is holding mid-service.

Running out of tries forgets the PIN rather than locking the phone. A lockout strands a waiter with a queue in front of them; the password is the thing that can actually get them back in, so that is what it falls back to.

Reachable from a phone that is already in. The offer comes after a sign-in, because that is the only moment somebody has proved they may set one. With a thirty day session, on every phone in a shop today that offer is a month away, so the same lock sits in the sheet behind the server icon, next to the other things that belong to the phone rather than to the shop.

Tamil for all fifteen strings. 15 tests, and the browser suite is green.

Owner: "remember the password and have simple auth. i think we already have
module of lock i think find that re use." Then, on the connection: "while doing
this lock first background do all finding server stuff. once logged in use jwt
or proper app authendication system. map device to cloud account."

THE LOCK. The till has one, called Till PIN Lock, and its rule is the first
half of the title. The code could not be shared: the till's PIN lives in
pin-lock.json on that machine, encrypted with an install secret, and never
leaves the main process. That is right for a till and means a handset needs its
own. The rule is what came across.

The typing was the token, and that is already fixed on the server: a handset
credential lasted 24 hours, so a part-time waiter who does not know the shop's
password needed a manager at the start of every service. A phone now stays
signed in for thirty days.

Which is what this is for. A phone signed in for a month is a phone anybody who
picks it up can take orders on. The answer is not to ask for the password
again, which is where this started. It is four digits.

  assets/common/lock.js   keypad, hash and salt, five tries
  index/script.js         asks at boot, when there is a session to resume
  kot-management.html     and the sheet on the floor screen offers one

Off unless somebody turns it on. Running out of tries FORGETS the PIN rather
than locking the phone, because a lockout strands a waiter with a queue in
front of them and the password is the thing that can actually get them back in.

NOTHING STANDS BETWEEN A SIGN-IN AND THE FLOOR, and that cost a suite. The
offer to set a PIN was made after a successful sign-in, which is the only
moment somebody has proved they may set one. Sound reasoning, wrong placement:
the pad is a full screen that waits for an answer, so the sign-in waited too.
246 specs stopped at a keypad instead of reaching the floor, which is exactly
what a waiter would have done. It is offered from the sheet now, beside the
other things that belong to the phone rather than to the shop.

THE FINDING HAPPENS WHILE THE PAD IS UP. Four digits take a couple of seconds
and the menu takes longer, and they used to happen one after the other. Started
behind the pad, without the redirect: a menu that arrives while somebody is
still proving they may hold this phone must not carry them onto the floor.

THE SHOP KNOWS THE PHONE. The sign-in now says what this handset is, once, at
the only moment the shop can be sure whose it is. The till writes it down
against the account, gives the token a claim naming the phone, and refuses a
handset the shop has stopped (POS: "A shop can see its handsets, and stop one").

So a 403 is two different nos and they send somebody to different places. Out
of handset slots is a licence the shop fixes on the till; a phone that has been
turned off is a decision about this handset, and the way back is the shop's
password. Telling a waiter holding a revoked phone to free a slot sends them to
a screen that cannot help them.

Tamil for every new string. 502 unit tests and the browser suite.
@sridharkalaibala
sridharkalaibala merged commit cf5777b into main Sep 18, 2026
1 check passed
@sridharkalaibala
sridharkalaibala deleted the feat/a-pin-unlocks-a-password-authenticates branch September 18, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant