Public visitor check-in
An admin or manager can create a persistent link from a location’s details. The link is a bearer capability: anyone holding it can submit check-ins for that location. A replacement link invalidates the old one, including printed QR codes. It does not expose visitor lists. Visitors can check out using their personal code.
The signed token identifies the tenant and location; the location’s key is checked inside its tenant-scoped transaction before any visitor data is read or written. The form submission ID prevents duplicate visits on retries, and the success page is shown only after that transaction commits. Confirmation is reloaded through the same browser session and checked against the visit’s current state; the code is not included in the confirmation URL. Public visits record their source without attributing them to a staff user. Token and code parameters are filtered from Rails logs; the public response is not cached and sends only the origin in referrer information.
The checkout code is generated from a server secret and the submission ID; only a keyed digest is stored with the visit. The location link and code must both be valid for public checkout. Changes to the application secret invalidate outstanding codes. Existing public visits without a code must be checked out by staff.
This is a development flow. Before deployment or using real visitor data, decide and implement retention and privacy information, assess public abuse controls (including shared rate limiting across processes), and configure an appropriate HTTPS public host. The location link is not visitor authentication; phone numbers are not verified. QR generation remains separate work.