gitoria

ident

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commita22d2daaa22d2daaident#31: the sign-in frame is no taller than the tallest step needs (plain CSS height per width), gate check for itmrea22d2daa/CONCEPT.md

4.6 KB

  1. # ident — concept (from the creator, 2026-09-24)
  2. ident is a login to ident itself (email one-time code). Everything else happens inside ident.
  3. ident, tickets and gitoria are PWAs; on the phone ident can register for push notifications.
  4. ## In ident
  5. - **Account**: you log in to ident with an email code. **There is no registration**: the first
  6. successful OTP login creates the user with a default identity, then shows the name fields and
  7. clearly states they are optional.
  8. - **Time zone**: set to the browser's time zone at first ident use.
  9. - **Identities**: a user has a **default identity from the beginning**. If they don't create
  10. another one, that one is always chosen. An identity has **no mandatory fields**; it can have
  11. nickname, firstname, lastname and an **avatar** (creator, 2026-09-24: apps show it, e.g. in comments). Inside ident it has an **identity name** — that one is shown
  12. in the selector.
  13. - **One id per app**: an identity gets a different id for every app, so ids are not transferable
  14. between apps.
  15. - **Apps**: **any ident user can register apps**. An app gets an **API key**. It uses one of two flows.
  16. - **The app never exposes the identity id** — it uses it server side only.
  17. - **Notifications**: apps never get the real email. To send a notification in an app's name you need
  18. that app's API key and the identity id (the one for that app). The user reads them in ident's
  19. notifications inbox.
  20. - A notification has: **name**, **text**, optional **icon**, optional **action link**. The action link
  21. may be any link; the icon may come from any URL (creator, 2026-09-24).
  22. - Channels: the **app presets** the channels, the **user can overwrite** them.
  23. - **Default: every notification goes to the daily mail**, sent at **17:00 in the user's time zone**.
  24. - An app that wants to send **pushes directly must first register that kind of notification**
  25. (by its name).
  26. - **Urgent** notifications are sent immediately: **push** if the user has registered a push
  27. device, **email** otherwise — always within the user's switches (creator, 2026-09-24).
  28. - The daily mail at 17:00 in the user's time zone needs **time-zone support in Hybriel** (creator: "hybriel
  29. needs time zone support") — ident does not ship its own zone rules.
  30. - **Per-app page**: for each app and identity the user has a page showing when they registered
  31. in that app and all its notifications (by name), each with **push** and **email** switches, and
  32. on top **one override for all**.
  33. - **More fields**: if an app needs more data from the user, it asks for it itself when the user
  34. registers with their ident id. ident does not hand out more.
  35. - **Later**: merge user accounts, move an identity to another account.
  36. - **Later**: ident hands over identity properties to the app **during the first handshake** (creator,
  37. 2026-09-24: "ident does handover properties during the first handshake, just not yet").
  38. ## Flow 1: login button
  39. The app shows "login with ident", which sends you to ident and back.
  40. ## Flow 2: identity selector
  41. - The app's page includes a script from ident, configured with the app's API key.
  42. - The script fetches from ident. If the requesting website is registered as an app in ident and
  43. uses its API key, ident answers with the identities of the logged-in ident user.
  44. - The selector is displayed: a shadow-DOM element in ident's design, which the target website can
  45. restyle.
  46. - It first says "choose ident". When the user selects an identity, that is the login.
  47. - What happens then is up to the app: our apps just switch the frontend to logged in; others
  48. might do a reload.
  49. ## Decided 2026-09-24 (architect proposal, accepted by the creator)
  50. - **Selector knows the website is already logged in**: the host tells the selector (it knows its own
  51. session), e.g. `<ident-selector logged-in>` / a property. The selector sets no cookie of its own.
  52. Logout on the website = host resets the selector.
  53. - **Server-side check of a selection**: selecting hands the script a one-time code; the website's
  54. server exchanges it with ident for the identity id. The API key sits in a public script, so server
  55. calls (exchange, notifications) use a separate **app secret**.
  56. ## In the app
  57. The app creates its own user connected to that ident identity by storing the identity id (server side).
  58. ## Open
  59. - **Client-only apps** (no server to keep the identity id): not figured out yet (creator).
  60. ## Not this
  61. The mission-003 build (`{id, email, name}` handed to apps, no identities, apps as a config allow
  62. list, no selector, no inbox) was built without this concept. Its email-code login to ident and the
  63. button redirect flow can be reused; the rest is rebuilt from this document.

Branches

Latest commits

  • a22d2daaident#31: the sign-in frame is no taller than the tallest step needs (plain CSS height per width), gate check for itmre
  • a77d1b22ident#31: the welcome form keeps editId a plain value (browser gate), README, wider rows in the framemre
  • 5c481bfdident#31: sign in to ident inside the selector's panel (email, code, identity in an iframe; a new address goes to ident in the same tab and comes back)mre
  • 061abfe2ident: the apps gate waits until the test app's login button stops moving before it clicks (the page grows after load and the click missed about every second run)mre
  • 45f7e4daident: the user menu's Sign out waits for the server before it reloads (the apps gate failed because the session could still be signed in)mre
  • f07658c7ident: home page shows the account once (account bar removed, the user menu carries email, Sign out, Sign out everywhere); wildcard origins https://*.domain for apps on many subdomains; gates follow (WIP: gates not re-run after the last edits)mre
  • f2c43bbbtheme: sync from layouts 4994037 (list rows stack, td word-keep, heading code, edited tap target)mre
  • 6d4f996esessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
  • 029eb5e5deploy: security gate (tests/security.mjs)mre
  • d3c065a8security audit (SI): uploadMax 0, Secure __Host- cookie behind https, headers on function routes/files, page CSP+referrer meta, app/identity caps, tests/security.mjs, reportmre
  • 5561a0cbreport I4-mobilemre
  • 4ca2ed20404 page in the shell (viewport, status 404, way home); phone: account actions live in the user menu so the open menu covers nothing; mobile gate; signoutall waits for a cold startmre
  • 9baad745tests: browser gate waits for the reloaded document (offline reload race under CPU throttle); HL_CPU_THROTTLE knobmre
  • b96796bdtests: wait for hydration before real clicks after a navigation (H2)mre
  • 9722964fre-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
  • c9b196c9tests/iplimit: wait for the welcome form itself after B's first login (identities list renders before it); mission 017 reportmre
  • 72e0f587ident#26: identity page with "Used in" (app, since, last use, Notif. chip, empty state); lastLogin recorded at exchange; gates + lisbeth E2E; mission 016 reportmre
  • 94576fbcident#26 WIP: identity page /identity/:iid with "Used in" (app, since, last use, Notif. chip), lastLogin recorded at exchange, "Used in…" link on the identities list; apps gate 4b, e2e-usedin.mjsmre
  • 349cb502tests/invites: wait for hydration on the code page before entering the code (native GET submit raced the welcome form); mission 015 reportmre
  • d1bf4720tests: no hard-coded ports — every gate's ports and fixture origins come from <GATE>_PORT / _CHROME env (defaults unchanged; Bob/fixture origins follow, selector cookie name too)mre