gitoria

ident

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commita4887ea3a4887ea3ident#47: the selector's sign-in frame no longer has a Continue button; the identity row itself is the link (gate tests/signin.mjs fails on the old code)mrea4887ea3/CONCEPT.md

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

Branches

Latest commits

  • a4887ea3ident#47: the selector's sign-in frame no longer has a Continue button; the identity row itself is the link (gate tests/signin.mjs fails on the old code)mre
  • d8ec703dident#45: /docs shows docs/IDENT.md (hl:markdown, vendored from ac1ed9da), one Docs entry in the main menu, README for developers only, gates tests/docs.mjs and tests/sessionwrites.mjs in deploy.shmre
  • ec6aad35Merge branch 'a28g-amp-callsites' into d45-docsmre
  • 6bfbd3f2ident#45: docs/IDENT.md, what ident is and how it works; CONCEPT.md marks one id per app as droppedmre
  • c0edca26ident#28 A28G: write & at every call that hands a session to an &-parameter; gate tests/sessionwrites.mjs pins that sign-in, pending address, embed sign-in and selector land in the session filesmre
  • 80965c08ident#28: README says the deploy goes through the standbymre
  • 2f41670cident#28: ident-standby service on port 45012 (no background round in the standby) and deploy.sh hands over through standby-swap.shmre
  • a544b261ident#28: README names the new vendored Hybrielmre
  • 716860b0ident#28: gates follow Hybriel ac1ed9da (lazy sessions, meta attribute order, JSON key order, default X-Frame-Options switched off for the embed page)mre
  • 889e00fbident#28: Hybriel master ac1ed9da (sessions reload a newer file, a replayed reconnect carries the server session); a startup fault exits 1 (on Error)mre
  • f5a55f8aident#11: apps can ask for nickname, firstname and lastname (fields list on /api/exchange, new POST /api/profile); empty fields come back null; gate checks, READMEmre
  • d8be66ebident: report and log line for the widget cache and frame height changemre
  • 2068f61aident#31: browsers revalidate the widget scripts on every load; the sign-in frame is exactly as tall as the current step (the frame page reports its height, selector.js accepts it from ident only)mre
  • 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