Cashier Login — Dedicated Employee Sign-in
import { Card, CardGrid, Steps, Aside, Tabs, TabItem } from ‘@astrojs/starlight/components’;
I. Overview
Section titled “I. Overview”The Cashier Login screen (/cashier-login) is the dedicated, employee-only sign-in page that opens automatically when you launch Vendor Desktop (the Electron app installed on the lane PC). It is built specifically for cashiers and front-of-house staff — not for store owners.
II. Access & prerequisites
Section titled “II. Access & prerequisites”What you need
Section titled “What you need”- Vendor Desktop installed on the lane PC (or a modern browser for ad-hoc use)
- An employee account with at least
poswrite permission - Your email and password given to you by the store owner
- (Optional) An assigned store (
store_idin your profile) — the store is then auto-selected
When to use which sign-in screen
Section titled “When to use which sign-in screen”| Sign-in screen | URL | Who it is for |
|---|---|---|
| Cashier login (this page) | /cashier-login | Cashiers / front-of-house |
| Operator login | /login | Employees who need the dashboard (catalog, finance, …) |
| Owner login | /vendor-login | Store owners / managers |
Owners who accidentally open
/cashier-loginwill be logged out by the screen and shown the “Only employee accounts can sign in here” banner. Owners should always use/vendor-login.
III. Step-by-step sign-in
Section titled “III. Step-by-step sign-in”-
Enter your email.
- Use the email that the store owner registered for you (e.g.
cashier@store.com). - The field is case-insensitive but the part before
@is what we match.
- Use the email that the store owner registered for you (e.g.
-
Enter your password.
- Click the 👁 icon on the right to show/hide the password while typing.
- The password is masked by default for security.
-
(Optional) Tick “Remember me”.
- Keeps you signed in on this device between shifts (until you sign out).
- Default is ON for cashier sessions. Turn it OFF if the PC is shared.
-
Click “Sign in”.
- The button shows a spinner and “Signing in…” while we authenticate.
- On success you are routed to
/point-of-sale/sale.
-
Wait for the POS workspace to load.
- The Sale workspace opens full-screen with the lane picker if required.
- If a work shift is required, the Open work shift dialog appears first.

Tuxing an employee — step by step (visual)
Section titled “Tuxing an employee — step by step (visual)”-
The left half is the brand panel with a hero title and subtitle describing your store benefits. It is the same on every auth screen.
-
The right half is the form. From top to bottom:
- Welcome title (
Welcome back/Chào mừng trở lại) - Email field with the envelope icon (
mingcute:mail-line) - Password field with the lock icon and an eye toggle
- “Remember me” checkbox
- “Sign in” button (full width)
- Welcome title (
IV. Validation & error states
Section titled “IV. Validation & error states”The screen runs two layers of validation:
| Layer | Trigger | Where it appears |
|---|---|---|
| Browser / Zod (client) | You submit with an invalid email or empty password | Inline message under the field |
| API (server) | The backend rejects your credentials | Red banner above the form |
A. Client validation errors
Section titled “A. Client validation errors”These show as soon as you click Sign in with an invalid form. No request is sent to the backend.
| Symptom | What happens | Fix |
|---|---|---|
Enter a valid email address. | Email field has no @ or invalid format | Re-type the email carefully |
This field is required. | Password is empty | Fill in the password |

B. API errors (banner)
Section titled “B. API errors (banner)”If the email/password are valid but the server rejects them, a red banner appears above the form and the URL stays on /cashier-login.
| Banner text | Cause | Fix |
|---|---|---|
Incorrect email or password. | Wrong password or the email does not exist | Reset your password (see below) or contact the owner |
Only employee accounts can sign in here. | You opened this page with an Owner account | Use /vendor-login instead |
This account is suspended. | Owner disabled your account | Contact the owner |
Network error | Internet is down on Vendor Desktop (first login) | Connect to the network, or sign in offline if a cached session exists |

C. Recovering access — use the password reset flow
Section titled “C. Recovering access — use the password reset flow”If you cannot remember it:
- From the cashier-login screen click the “Forgot password” link in the sub-header (the orange hint line under the title).
- Or navigate directly to
/cashier-login/forgot-password.
The dedicated cashier reset flow is documented at Forgot password — Cashier flow.
V. After-sign-in behaviour
Section titled “V. After-sign-in behaviour”Once your email/password are accepted:
- The screen issues a short-lived access token and refreshes it silently.
- You are routed to
/point-of-sale/sale(full-screen POS). - The store selector on top of the workspace picks the store that is hard-coded to your employee profile. If you belong to multiple stores, you can switch.
- The lane selector picks the lane you were assigned to. Multi-lane stores show a picker.
- If the store requires a work shift, the Open work shift dialog opens before the workspace renders.
You will not see the dashboard side menu. The vendor dashboard (/dashboard/*) is not part of the cashier experience — it lives on the mall-side browser/owner login at /vendor-login.
VI. Owner vs employee sign-in comparison
Section titled “VI. Owner vs employee sign-in comparison”| Capability | Cashier login (/cashier-login) | Operator login (/login) | Owner login (/vendor-login) |
|---|---|---|---|
| Allowed vendor types | employee | employee | |
| Default landing | /point-of-sale/sale | /dashboard | /dashboard (or /point-of-sale/sale from owner menu) |
| Visible side menu | None (POS only) | Full dashboard | Full dashboard + admin tools |
| Hardware setup visible | ✅ (terminal, printer, drawer) | ✅ | ✅ + advanced |
| Settings hub access | ✅ | ✅ | ✅ |
| Cross-store switch | Limited (per profile) | ✅ | ✅ |
| Suitable for back-office order entry | ❌ | ✅ | ✅ |
| Suitable for retail lane | ✅ | ❌ (UI optimised for desktop) | ❌ |
Rule of thumb: if your daily job is to ring up customers at a lane, sign in at
/cashier-login. If you need the catalog, finance or HR pages, sign in at/loginor/vendor-login.
VII. Troubleshooting & FAQ
Section titled “VII. Troubleshooting & FAQ”Common error codes
Section titled “Common error codes”| HTTP | Meaning | Action |
|---|---|---|
400 | Validation failed (server-side) | Check email format |
401 | Wrong credentials | Reset password or contact owner |
403 | Account is suspended OR not an employee | Use /vendor-login if owner |
429 | Too many attempts | Wait 60 seconds, retry |
5xx | Backend issue | Retry, or check status page |
VIII. Related
Section titled “VIII. Related”- Forgot password — Cashier — Recover your cashier password.
- Forgot password — Owner/Employee — Shared flow for the dashboard side.
- Verify OTP — Enter the 6-digit code from email.
- Reset password — Set a new password.
- Vendor login (Owner) — Owner dashboard sign-in.
- Register an account — New store owners only.
- Store & lane selection — After sign-in.
- Sale workspace — Where you spend your shift.