Skip to content
Valery

Module 10 · Lesson 5 of 6

Sign-in, logging and monitoring

Sign-in options and roles, what to log and what never to log, error monitoring and uptime checks.

8 min

Once an app holds client information, two questions follow it everywhere: who is allowed in, and how will you know when something goes wrong? Sign-in (also called authentication, or auth) answers the first. Logging and monitoring answer the second.

Both are easy to get wrong in opposite directions. Too little, and a departed agent can still read leads, or the lead form is broken for a week before anyone notices. Too much, and your logs become a second, unprotected copy of every client's details. This lesson covers sign-in options, roles, what to log and never log, error monitoring and uptime checks for a small brokerage app.

Sign-in options

Hosted sign-in services handle the hard parts (storing passwords safely, sending sign-in emails, resetting accounts) so your coding agent doesn't have to build them. As of October 2026, Supabase Auth supports email and password, magic links and one-time codes by email, social sign-in such as Google, phone sign-in by SMS and enterprise single sign-on. Neon offers a managed sign-in service built on Better Auth that supports Google and other sign-in providers. Other hosted services exist too, and your coding agent can set any of them up.

The three methods you'll choose between most often:

Three ways to let people sign in
QuestionEmail link or codePasswordGoogle sign-in
How it worksA one-time link or code is emailed each timeThe person picks a password and types itThe person clicks Sign in with Google
Good forClients and occasional users who forget passwordsStaff tools used daily, paired with two-step verificationBrokerages that already run on Google Workspace
Watch out forSlow or filtered email; anyone with the inbox can sign inReused and weak passwords; you must offer resetsPersonal Gmail accounts on staff tools; access ends only when the Google account does

For staff tools, the strongest simple choice is usually Google sign-in limited to the brokerage's own Workspace domain, or passwords with two-step verification (a code from an app on the phone). For client-facing pages, an email link is friendliest. Whatever you pick, removing access must be one step: when an agent leaves, disabling their account must lock them out of every tool the same day.

Roles

Signing in proves who someone is. Roles decide what they can do. Keep roles few and plain:

RoleCan doExample person
OwnerEverything, including billing and deleting dataBroker of record, one other principal
AdminManage users and settings, see all recordsOperations lead
AgentSee and edit their own leads and listingsEach salesperson
AssistantSee the records of the agents they supportA team's licensed assistant
ViewerRead reports, no client detailsBookkeeper

Two rules make roles work. First, least privilege: start everyone at the lowest role and raise it only when a task needs it. Second, enforce roles in the database, not just by hiding buttons. On Supabase that means row-level security rules (lesson 4) tied to each signed-in user. Ask your coding agent to show you, in plain words, the rule behind each role, and test it by signing in as a fictional agent and trying to open someone else's lead.

Review the user list every quarter. Remove anyone who has left, and lower anyone whose role is higher than their job.

What to log, and what never to log

A log is a running record of what the app did: requests received, records created, errors hit. Logs are how you answer "did the form work on Saturday?" and "who changed this listing?". They are also copied to vendors, kept for weeks and read by people who would never see the database itself. So log events, not people's details.

Log thisNever log this
The time, the action and the record ID ("signin 41 created")Passwords, API keys, tokens, connection strings
Which user ID did itFull names, emails and phone numbers when an ID will do
Error messages and which step failedSocial insurance numbers, ID documents, banking or deposit details
How long a step took, and which service was slowFull text of client messages, call transcripts or AI prompts containing client details
Sign-ins, failed sign-ins and role changesHealth, family or financial details someone shared with an agent

When debugging requires a detail, log it in masked form (j***@mail.test) or log the record ID and look the detail up in the database, where access is controlled. Tell your coding agent this rule up front: "Never log personal information or secrets. Log record IDs instead."

Keep logs only as long as you need them. As of October 2026, Vercel keeps runtime logs for one hour on Hobby and one day on Pro, and Pro can send logs to a longer-term service. Any longer-term log store needs its own retention period and access list, like any other system with personal information.

Error monitoring

An error monitoring service catches crashes in your app, groups them, and emails or messages you when a new one appears, with enough context to fix it. Sentry is the best-known; others exist, and several offer free plans for a single developer as of October 2026 (check each vendor's pricing page for current limits).

Set it up with three precautions:

  • Turn on the service's scrubbing of personal data, and add your own field names (email, phone, full_name) to its list of fields to strip.
  • If it offers session replay (a video-like recording of what the visitor did), mask all text and form inputs, or leave replay off.
  • Send alerts to a shared channel or inbox, not one person's phone, and name who looks at them during business hours.

Uptime checks

An uptime monitor visits your site every few minutes from outside and alerts you when it doesn't respond. It catches the failures your app can't report itself: an expired domain, a broken deploy, a host outage. UptimeRobot and Better Stack both have free plans as of October 2026. Read the terms before using a free plan for a commercial site.

Useful checks for a brokerage app:

  • The home page or form page loads.
  • A small "health" address your coding agent adds, which confirms the app can reach the database.
  • A heartbeat for scheduled jobs (Module 4): the job pings the monitor each time it runs, and you're alerted if a ping is missed. That's how you learn the nightly listing-alert email didn't go out.

In practice

Maple & Main Realty's showing-request app lets agents sign in with Google, restricted to the brokerage's Workspace domain. The broker of record and the ops lead are owners; agents see only their own requests.

When a client books a showing for 123 Example Street, the app logs showing_request 208 created by form, listing 17, 340 ms. No name, no phone. On Saturday afternoon Sentry posts an alert to the ops channel: the confirmation text is failing. The log shows the SMS provider returning an error for every request since 1:12 p.m. The ops lead turns on the app's fallback (email confirmations), and the coding agent finds the expired SMS key on Monday. Meanwhile, the uptime monitor confirmed the form itself never went down, so no requests were lost.

When an agent leaves in November, the ops lead removes their Google account. Their access to the showing app ends the same minute.

Common mistakes

  • Logging whole form submissions "to help with debugging".
  • Hiding the "All leads" button from agents but leaving the data readable through the API.
  • Letting staff sign in to work tools with personal Gmail accounts.
  • Alerts going to one person who is on vacation.
  • Error monitoring with session replay recording every keystroke on a lead form.

Key takeaways

  • Use a hosted sign-in service; choose email links for clients and Google Workspace or passwords with two-step verification for staff.
  • Keep roles few, enforce them in the database, and review them every quarter.
  • Log events and IDs, never secrets and never more personal information than needed.
  • Add error monitoring with scrubbing turned on, plus an outside uptime check and heartbeats for scheduled jobs.

Finished reading? Move on when you're ready.