History
3 decisions · 1 assumption to check
- c153785feat(accounts): open sign-up to everyone and add an admin page · Aman Kumar ·
refs now records when each person last used the site with a browser session or an access token. Only admins see it, on the admin page.
Why
- The admin page must show which people come back, and refs had no record of visits.
- refs writes the time at most once every 5 minutes for each person, so the cost stays small.
If this changes later
Remove the recording and drop the stored times with a migration. The admin page then loses the last seen column.
Paths considered
- Chosen
- Read visits from PostHog
- PostHogThe Worker would need a PostHog API key to read data back, and refs sends PostHog only a few events.
Touches
resolveActorusers.last_seen_at
Evidence · 2
- apps/backend/identity.ts
- migrations/0037_open_signup.sql
c153785feat(accounts): open sign-up to everyone and add an admin page · Aman Kumar ·
refs now records when each person last used the site with a browser session or an access token. Only admins see it, on the admin page.
Why
- The admin page must show which people come back, and refs had no record of visits.
- refs writes the time at most once every 5 minutes for each person, so the cost stays small.
If this changes later
Remove the recording and drop the stored times with a migration. The admin page then loses the last seen column.
Paths considered
- Chosen
- Read visits from PostHog
- PostHogThe Worker would need a PostHog API key to read data back, and refs sends PostHog only a few events.
Touches
resolveActorusers.last_seen_at
Evidence · 2
- apps/backend/identity.ts
- migrations/0037_open_signup.sql