gitoria

ident

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchnv1-navigate644f9775|||PR ident#36 navigate() instead of window.location in the shell, start shell and homemrenv1-navigate/components/home.hl

21.3 KB

  1. // components/home.hl — `/` and `/signin/:rid`: ALL OF IDENT (pieces 1+2, tickets #24 #25;
  2. // CONCEPT.md).
  3. // Signed out: email → a six-digit code by mail → signed in. There is no registration:
  4. // the first right code for an address creates the account with a DEFAULT IDENTITY, then
  5. // this page shows that identity's name fields and says they are optional (Skip).
  6. // Signed in: the account's identities (list, new, edit, delete — never the last one)
  7. // and its time zone (the browser's at the first login; changeable here).
  8. //
  9. // Under `/signin/<rid>` the page belongs to an APP'S LOGIN BUTTON (lib/apps.hl requestOf):
  10. // it names the app, signs in to ident if needed, then asks WHICH IDENTITY the app gets
  11. // (with a single identity it still shows which one, one click) and sends the browser back
  12. // to the app with a one-time code. Managing identities stays on `/`.
  13. //
  14. // Every step takes the server's answer from the CALL (the value form of emit): it rides
  15. // the ack, over the socket or the POST fallback.
  16. parent './main.hl'
  17. import { accountOfSession, setTimeZone, signOutEverywhere } from '../lib/accounts.hl'
  18. import { recordPending, dropPending, signInWithCode } from '../lib/login.hl'
  19. import { identityRows, createIdentity, updateIdentity, deleteIdentity } from '../lib/identities.hl'
  20. import { requestOf, grantRequest } from '../lib/apps.hl'
  21. import { navigate } from 'hl:web'
  22. import { siteName } from '../project.hl'
  23. session = null
  24. rid = null
  25. // 'code' on THE CODE PAGE `/code` and `/signin/<rid>/code` (ident#20; lib/api.hl codePage
  26. // renders this component there, only while the session has a pending code), else null
  27. step = null
  28. onCodePage = step == 'code'
  29. // the pending address, read by codePage from the session and handed in as a param (mission
  30. // 048): read here from the session, hl:web (64527baa) would re-derive it after EVERY face
  31. // that takes the session — after the 5th wrong code it turned null and the code form
  32. // vanished with nothing to click (gate "after 5 wrong tries even the RIGHT code is refused")
  33. pending = null
  34. // where this login lives: the email form, and the code page after "Send me a code"
  35. homeUrl = rid != null ? '/signin/' + rid : '/'
  36. codeUrl = rid != null ? '/signin/' + rid + '/code' : '/code'
  37. me = accountOfSession(&session)
  38. signedIn = me != null
  39. // THE APP'S LOGIN REQUEST (null on `/`, or when unknown / expired)
  40. request = rid != null ? requestOf(rid) : null
  41. forApp = request != null
  42. badRequest = rid != null && request == null
  43. appName = request != null ? request.app.name : ''
  44. appOrigin = request != null ? request.origin : ''
  45. forInvite = request != null && request.invite != ''
  46. requestLead = forInvite ? 'You are invited to ' : 'Sign in to '
  47. onWelcome = step == 'welcome' && me != null && forApp // a NEW address sent here from the selector's frame (ident#31): the default identity's form first
  48. choosing = forApp && me != null && !onWelcome // the identity choice for the app
  49. manage = rid == null && me != null // identities + time zone (only on `/`)
  50. meEmail = me != null ? me.email : ''
  51. timeZone = me != null ? me.timeZone : ''
  52. tzInput = timeZone
  53. identities = me != null ? identityRows(me.id) : []
  54. __title = siteName + (forApp ? ' | sign in to ' + appName : (me != null ? ' | your identities' : ' | sign in'))
  55. // the login steps (a View's `if` takes a member, so each step is one).
  56. // THE CODE STEP IS ITS OWN PAGE (ident#20, creator: "just make a /code where it checks a
  57. // pending code"): "Send me a code" records the address in this browser's session (face
  58. // rememberPending) and goes to `/code`; that page shows the code form for the session's
  59. // pending address (lib/login.hl pendingOf) — so a reload, a second tab or a re-seed keeps it.
  60. pendingEmail = onCodePage && me == null && !badRequest ? pending : null
  61. askEmail = me == null && !badRequest && !onCodePage
  62. askCode = pendingEmail != null
  63. email = ''
  64. sentTo = pendingEmail != null ? pendingEmail : ''
  65. code = ''
  66. message = ''
  67. notice = ''
  68. // THE IDENTITY FORM — new, edit, and right after the first login the default identity
  69. // ("welcome": the names are optional, Skip closes it)
  70. editing = onWelcome
  71. welcome = onWelcome
  72. notWelcome = !onWelcome // `if (!welcome)` in a View renders nothing: an `if` takes a member
  73. editId = '' // '' = a new identity, else the identity's id (a UUID)
  74. // the default identity the welcome form (/signin/<rid>/welcome) edits. It is its OWN member: `editId` must stay a plain value (a member made of an
  75. // expression is recomputed when `identities` changes, which reset the id of every identity edited on `/`)
  76. welcomeId = onWelcome ? '' + identities[0].id : ''
  77. editHeading = onWelcome ? 'Welcome — name your default identity' : ''
  78. fIdentityName = ''
  79. fNickname = ''
  80. fFirstname = ''
  81. fLastname = ''
  82. fAvatar = ''
  83. hasAvatarPreview = false
  84. avatarPreviewClass = hasAvatarPreview ? 'avatar' : 'avatar hidden'
  85. avatarRemoveClass = hasAvatarPreview ? 'quiet small' : 'quiet small hidden'
  86. View {
  87. identCard {
  88. if (forApp) {
  89. appRequest { id = "apprequest" requestLead strong { id = "appname" appName } " " requestOrigin { id = "apporigin" appOrigin } }
  90. }
  91. if (badRequest) {
  92. h1 { "Login request expired" }
  93. p { id = "badrequest" class = "message" "This login request is unknown or expired. Go back to the app and start the login again." }
  94. }
  95. if (askEmail) {
  96. h1 { "Sign in" }
  97. p { class = "lead" "We mail you a one-time code. There are no passwords, and no sign-up: the first login with an address creates its account." }
  98. form { id = "emailform"
  99. on submit(e) {
  100. e.preventDefault()
  101. emit ask(e)
  102. }
  103. label { "Email"
  104. input { id = "email" name = "email" type = "email" autocomplete = "email" required = "required" value = email on input(e) { emit setEmail(e.target.value) } }
  105. }
  106. button { id = "sendcode" type = "submit" "Send me a code" }
  107. }
  108. }
  109. if (askCode) {
  110. h1 { "Enter your code" }
  111. p { id = "sentto" class = "lead" "We sent a six-digit code to " strong { sentTo } ". It is valid for 10 minutes." }
  112. form { id = "codeform"
  113. on submit(e) {
  114. e.preventDefault()
  115. emit verify(e)
  116. }
  117. label { "One-time code"
  118. input { id = "code" name = "code" autocomplete = "one-time-code" inputmode = "numeric" pattern = "[0-9]{6}" maxlength = "6" required = "required" value = code on input(e) { emit setCode(e.target.value) } }
  119. }
  120. formButtons {
  121. button { id = "verify" type = "submit" "Sign in" }
  122. button { id = "back" type = "button" class = "quiet" "Other address" on click(e) { emit back(e) } }
  123. }
  124. }
  125. }
  126. if (signedIn) {
  127. if (editing) {
  128. form { id = "identityform"
  129. on submit(e) {
  130. e.preventDefault()
  131. emit saveForm(e)
  132. }
  133. h1 { id = "formheading" editHeading }
  134. if (welcome) {
  135. p { id = "welcome" class = "lead" "Your account is ready and has a default identity. All of these fields are " strong { "optional" } " — fill in what you like, or skip it and do it later." }
  136. }
  137. label { "Identity name " fieldHint { "(shown when you pick an identity in an app; optional)" }
  138. input { id = "fidentityname" name = "identityName" maxlength = "60" autocomplete = "off" value = fIdentityName on input(e) { emit setF('identityName', e.target.value) } }
  139. }
  140. label { "Nickname " fieldHint { "(optional)" }
  141. input { id = "fnickname" name = "nickname" maxlength = "60" autocomplete = "nickname" value = fNickname on input(e) { emit setF('nickname', e.target.value) } }
  142. }
  143. label { "First name " fieldHint { "(optional)" }
  144. input { id = "ffirstname" name = "firstname" maxlength = "60" autocomplete = "given-name" value = fFirstname on input(e) { emit setF('firstname', e.target.value) } }
  145. }
  146. label { "Last name " fieldHint { "(optional)" }
  147. input { id = "flastname" name = "lastname" maxlength = "60" autocomplete = "family-name" value = fLastname on input(e) { emit setF('lastname', e.target.value) } }
  148. }
  149. avatarField {
  150. img { id = "avatarpreview" class = avatarPreviewClass src = fAvatar alt = "" width = "48" height = "48" }
  151. label { "Avatar " fieldHint { "(optional; a picture apps can show, e.g. next to your comments)" }
  152. input { id = "favatarfile" type = "file" accept = "image/png,image/jpeg,image/webp,image/gif" }
  153. }
  154. input { id = "favatar" name = "avatar" type = "hidden" value = fAvatar on input(e) { emit setF('avatar', e.target.value) } }
  155. button { id = "avatarremove" type = "button" class = avatarRemoveClass "Remove picture" on click(e) { emit setF('avatar', '') } }
  156. span { id = "avatarnote" class = "avatar-note" }
  157. }
  158. formButtons {
  159. button { id = "saveidentity" type = "submit" "Save" }
  160. if (welcome) { button { id = "skip" type = "button" class = "quiet" "Skip" on click(e) { emit closeForm(e) } } }
  161. if (notWelcome) { button { id = "cancel" type = "button" class = "quiet" "Cancel" on click(e) { emit closeForm(e) } } }
  162. }
  163. }
  164. }
  165. if (choosing) {
  166. section { id = "choosesection"
  167. h1 { "Choose an identity" }
  168. p { class = "lead" "Which identity signs in to " strong { appName } "? The app gets only the identity's short id — no email, no names." }
  169. ul { id = "chooselist"
  170. for (row of identities) {
  171. li { class = "choice"
  172. if (row.hasAvatar) { img { class = "avatar" src = row.avatar alt = "" width = "32" height = "32" } }
  173. identityMain {
  174. identityLabel { row.label }
  175. identityShortId { class = "shortid" row.shortId }
  176. if (row.isDefault) { defaultBadge { "default" } }
  177. identityDetails { row.details }
  178. }
  179. button { type = "button" class = "choose" value = row.id "Continue" on click(e) { emit choose(e.target.value) } }
  180. }
  181. }
  182. }
  183. }
  184. }
  185. if (manage) {
  186. section { id = "identitiessection"
  187. sectionHead {
  188. h1 { "Your identities" }
  189. button { id = "newidentity" type = "button" class = "small" "New identity" on click(e) { emit openNew(e) } }
  190. }
  191. ul { id = "identities"
  192. for (row of identities) {
  193. li { class = "identity"
  194. if (row.hasAvatar) { img { class = "avatar" src = row.avatar alt = "" width = "32" height = "32" } }
  195. identityMain {
  196. identityLabel { row.label }
  197. identityShortId { class = "shortid" row.shortId }
  198. if (row.isDefault) { defaultBadge { "default" } }
  199. identityDetails { row.details }
  200. }
  201. identityActions {
  202. a { class = "used" href = row.usedHref "Used in…" }
  203. button { type = "button" class = "quiet small edit" value = row.id "Edit" on click(e) { emit openEdit(e.target.value) } }
  204. if (row.canDelete) { button { type = "button" class = "quiet small danger delete" value = row.id "Delete" on click(e) { emit remove(e.target.value) } } }
  205. }
  206. }
  207. }
  208. }
  209. }
  210. section { id = "timezonesection"
  211. h2 { "Time zone" }
  212. p { class = "lead" "Taken from your browser at your first login. Currently " strong { id = "timezone" timeZone } "." }
  213. p { id = "digestnote" class = "lead" "Your daily mail of notifications comes at 17:00 in this time zone." }
  214. form { id = "tzform"
  215. on submit(e) {
  216. e.preventDefault()
  217. emit saveZone(e)
  218. }
  219. label { "Time zone (IANA name, e.g. Europe/Vienna)"
  220. input { id = "tzinput" name = "timeZone" autocomplete = "off" maxlength = "64" required = "required" value = tzInput on input(e) { emit setTz(e.target.value) } }
  221. }
  222. formButtons {
  223. button { id = "savetz" type = "submit" "Save time zone" }
  224. button { id = "browsertz" type = "button" class = "quiet" "Use this browser's" on click(e) { emit useBrowserZone(e) } }
  225. }
  226. }
  227. }
  228. }
  229. }
  230. p { id = "notice" class = "notice" notice }
  231. p { id = "message" class = "message" message }
  232. }
  233. }
  234. on setEmail(v) { email = v }
  235. on setCode(v) { code = v }
  236. on setTz(v) { tzInput = v }
  237. on setF(name, v) {
  238. if (name == 'identityName') { fIdentityName = v }
  239. if (name == 'nickname') { fNickname = v }
  240. if (name == 'firstname') { fFirstname = v }
  241. if (name == 'lastname') { fLastname = v }
  242. if (name == 'avatar') { fAvatar = v hasAvatarPreview = v.trim() != '' }
  243. }
  244. // the browser's own time zone (IANA name) and whether a name is one it knows (`Intl` is a
  245. // browser global of client code, hybriel#18)
  246. browserZone = () => { return Intl.DateTimeFormat().resolvedOptions().timeZone }
  247. knownZone = (v) => { return v == 'UTC' || Intl.supportedValuesOf('timeZone').includes(v) }
  248. // THE CODE REQUEST is a plain POST to /api/code (lib/api.hl), not a face: only an HTTP
  249. // request carries the client IP (X-Client-IP) the per-IP limit counts (mission 010).
  250. // A refusal (400, 429) answers { error } and is shown like every other message.
  251. on ask(e) {
  252. message = ''
  253. res = fetch('/api/code', { method = 'POST' headers = { 'Content-Type' = 'application/json' } body = JSON.stringify({ email = email }) })
  254. r = res != null ? res.json() : null
  255. if (r == null) {
  256. message = 'the server did not answer — try again'
  257. return null
  258. }
  259. if (r.error != null) {
  260. message = r.error
  261. return null
  262. }
  263. // THE SESSION REMEMBERS THE STEP, then the browser goes to the code page. A function
  264. // route gets no session (hybriel#11), so the face records it; it refuses unless a
  265. // code for the address is really waiting.
  266. k = emit server rememberPending(r.email)
  267. if (k == null) {
  268. message = 'the server did not answer — try again'
  269. return null
  270. }
  271. if (k.error != null) {
  272. message = k.error
  273. return null
  274. }
  275. navigate(codeUrl)
  276. }
  277. on verify(e) {
  278. message = ''
  279. r = emit server verifyCode(sentTo, code, browserZone())
  280. if (r == null) {
  281. message = 'the server did not answer — try again'
  282. return null
  283. }
  284. if (r.error != null) {
  285. message = r.error
  286. return null
  287. }
  288. askCode = false
  289. // signed in: the address bar leaves the code page (a reload of /code would go back
  290. // to it anyway — lib/api.hl codePage sends a signed-in browser there)
  291. window.history.replaceState(null, '', homeUrl)
  292. meEmail = r.account.email
  293. timeZone = r.account.timeZone
  294. tzInput = r.account.timeZone
  295. identities = r.identities
  296. signedIn = true
  297. notice = ''
  298. manage = !forApp
  299. choosing = forApp
  300. // the shell (components/main.hl) shows the user menu from the account: a page's emit reaches every level above it
  301. // (hybriel#193), so the header follows the in-place sign-in without a reload — the welcome form below stays in place
  302. emit shellSession(r.account.email)
  303. // THE FIRST LOGIN: the default identity's names, optional (for an app too: the
  304. // choice follows once the form is saved or skipped)
  305. if (r.created) {
  306. fillForm(r.identities[0])
  307. editHeading = 'Welcome — name your default identity'
  308. welcome = true
  309. notWelcome = false
  310. editing = true
  311. choosing = false
  312. }
  313. }
  314. // THE CHOICE: the server makes (or finds) this identity's id for the app and answers
  315. // the app's return URL with a one-time code — the browser goes there
  316. on choose(id) {
  317. message = ''
  318. notice = ''
  319. r = emit server chooseIdentity(rid, '' + id)
  320. if (r == null) {
  321. message = 'the server did not answer — try again'
  322. return null
  323. }
  324. if (r.error != null) {
  325. message = r.error
  326. return null
  327. }
  328. notice = 'Back to ' + appName + ' …'
  329. window.location.assign(r.url)
  330. }
  331. fillForm = (row) => {
  332. editId = row.id
  333. fIdentityName = row.identityName
  334. fNickname = row.nickname
  335. fFirstname = row.firstname
  336. fLastname = row.lastname
  337. fAvatar = row.avatar
  338. hasAvatarPreview = row.hasAvatar
  339. return null
  340. }
  341. rowOf = (id) => {
  342. for (row of identities) { if ('' + row.id == '' + id) { return row } }
  343. return null
  344. }
  345. on openNew(e) {
  346. message = ''
  347. notice = ''
  348. editId = ''
  349. fIdentityName = ''
  350. fNickname = ''
  351. fFirstname = ''
  352. fLastname = ''
  353. fAvatar = ''
  354. hasAvatarPreview = false
  355. editHeading = 'New identity'
  356. welcome = false
  357. notWelcome = true
  358. editing = true
  359. }
  360. on openEdit(id) {
  361. message = ''
  362. notice = ''
  363. row = rowOf(id)
  364. if (row == null) { return null }
  365. fillForm(row)
  366. editHeading = 'Edit ' + row.label
  367. welcome = false
  368. notWelcome = true
  369. editing = true
  370. }
  371. on closeForm(e) {
  372. editing = false
  373. welcome = false
  374. notWelcome = true
  375. message = ''
  376. choosing = forApp
  377. }
  378. on saveForm(e) {
  379. message = ''
  380. fields = { identityName = fIdentityName nickname = fNickname firstname = fFirstname lastname = fLastname avatar = fAvatar }
  381. let r = null
  382. if (editId == '' && welcome) {
  383. r = emit server editIdentity('' + welcomeId, fields)
  384. } else if (editId == '') {
  385. r = emit server addIdentity(fields)
  386. } else {
  387. r = emit server editIdentity('' + editId, fields)
  388. }
  389. if (r == null) {
  390. message = 'the server did not answer — try again'
  391. return null
  392. }
  393. if (r.error != null) {
  394. message = r.error
  395. return null
  396. }
  397. identities = r.identities
  398. notice = editId == '' && !welcome ? 'Identity created.' : 'Identity saved.'
  399. editing = false
  400. welcome = false
  401. notWelcome = true
  402. choosing = forApp
  403. }
  404. on remove(id) {
  405. message = ''
  406. notice = ''
  407. row = rowOf(id)
  408. if (row == null) { return null }
  409. if (!confirm('Delete the identity “' + row.label + '”?')) { return null }
  410. r = emit server dropIdentity('' + id)
  411. if (r == null) {
  412. message = 'the server did not answer — try again'
  413. return null
  414. }
  415. if (r.error != null) {
  416. message = r.error
  417. return null
  418. }
  419. identities = r.identities
  420. if ('' + editId == '' + id) { editing = false }
  421. notice = 'Identity deleted.'
  422. }
  423. on useBrowserZone(e) { tzInput = browserZone() }
  424. on saveZone(e) {
  425. message = ''
  426. notice = ''
  427. v = tzInput.trim()
  428. if (!knownZone(v)) {
  429. message = 'this browser does not know the time zone “' + v + '”'
  430. return null
  431. }
  432. r = emit server changeTimeZone(v)
  433. if (r == null) {
  434. message = 'the server did not answer — try again'
  435. return null
  436. }
  437. if (r.error != null) {
  438. message = r.error
  439. return null
  440. }
  441. timeZone = r.timeZone
  442. tzInput = r.timeZone
  443. notice = 'Time zone saved.'
  444. }
  445. // "Other address": the session forgets the pending sign-in, back to the email form
  446. on back(e) {
  447. message = ''
  448. r = emit server forgetPending()
  449. navigate(homeUrl)
  450. }
  451. // ---- the faces ------------------------------------------------------------------------
  452. // A face's LAST parameter is the session (the framework appends it). Every face that
  453. // needs the account asks accountOfSession, which only accepts the framework's Session.
  454. // A face runs on a BLANK instance: it has its arguments and its imports, not this
  455. // component's members or functions.
  456. // (the code request is NOT a face since mission 010: POST /api/code in lib/api.hl — a face
  457. // sees no request headers, so it could not apply the per-IP limit; a face here would be a
  458. // way around it)
  459. // the right code signs the session in; the first one for an address creates the
  460. // account, its default identity and stores the browser's time zone
  461. on server verifyCode(email, code, timeZone, session) {
  462. if (session == null) { return { error = 'no session — reload the page' } }
  463. if (email == null || hlTypeName(email) != 'String' || code == null || hlTypeName(code) != 'String') { return { error = 'email and code must be strings' } }
  464. return signInWithCode(&session, email, code, timeZone)
  465. }
  466. on server addIdentity(fields, session) {
  467. let me = accountOfSession(&session)
  468. if (me == null) { return { error = 'you are not signed in' } }
  469. r = createIdentity(me.id, fields)
  470. if (r.error != null) { return r }
  471. return { identity = r.identity identities = identityRows(me.id) }
  472. }
  473. on server editIdentity(id, fields, session) {
  474. let me = accountOfSession(&session)
  475. if (me == null) { return { error = 'you are not signed in' } }
  476. r = updateIdentity(me.id, id, fields)
  477. if (r.error != null) { return r }
  478. return { identity = r.identity identities = identityRows(me.id) }
  479. }
  480. on server dropIdentity(id, session) {
  481. let me = accountOfSession(&session)
  482. if (me == null) { return { error = 'you are not signed in' } }
  483. r = deleteIdentity(me.id, id)
  484. if (r.error != null) { return r }
  485. return { deleted = r.deleted identities = identityRows(me.id) }
  486. }
  487. on server changeTimeZone(tz, session) {
  488. let me = accountOfSession(&session)
  489. if (me == null) { return { error = 'you are not signed in' } }
  490. r = setTimeZone(me.id, tz)
  491. if (r.error != null) { return r }
  492. return { timeZone = r.account.timeZone }
  493. }
  494. // the identity for the app's login request (lib/apps.hl grantRequest: a plain login, or an invite's): { url } or { error }
  495. on server chooseIdentity(rid, identity, session) {
  496. let me = accountOfSession(&session)
  497. if (me == null) { return { error = 'you are not signed in' } }
  498. if (rid == null || hlTypeName(rid) != 'String') { return { error = 'field rid must be a string' } }
  499. if (identity == null || hlTypeName(identity) != 'String') { return { error = 'field identity must be a string' } }
  500. return grantRequest(me.id, rid, identity)
  501. }
  502. // THE PENDING SIGN-IN (ident#20): recorded after POST /api/code answered, only while a
  503. // code for that address is really waiting (lib/login.hl recordPending); "Other address"
  504. // forgets it. Named apart from the store functions (faces dispatch by name, hybriel#36).
  505. on server rememberPending(email, session) {
  506. return recordPending(&session, email)
  507. }
  508. on server forgetPending(session) {
  509. return dropPending(&session)
  510. }
  511. on server signOut(session) {
  512. if (session != null) { session.user = null }
  513. return true
  514. }
  515. on server signOutAll(session) {
  516. let me = accountOfSession(&session)
  517. if (me == null) { return { error = 'you are not signed in' } }
  518. // pushed BEFORE the sessions go: the audience reads each connection's session user
  519. emit client signedOutAll(me.id)
  520. // THIS browser's own session stays (signed out, like "Sign out"): the page goes on in place — its notice shows and the
  521. // next code request works without a reload; every OTHER session of the account is dropped
  522. session.user = null
  523. return signOutEverywhere(me.id)
  524. }

Branches

Latest commits

  • 644f9775|||PR ident#36 navigate() instead of window.location in the shell, start shell and homemre
  • 4ca2f921deploy.sh: tar --hard-dereference so backups hold no hard linksmre
  • 23971fb7ident#49: media queries in the language's @media formmre
  • 73f4f97dident: re-vendor to hybriel day38b (mpackdb store-open fix)mre
  • aa056c03ident: a startup error prints its message before exit 1 (hybriel#247)mre
  • ee37a861ident#G48: gitoria's registration gets the wildcard origin of its repo addresses at load (gate tests/gitoria-origin.mjs)mre
  • dc6d486fident#27: the docs gate expects the new Access entry in the main menumre
  • d277633cident#27: README: identity access and the introspect endpointmre
  • e999b0d3ident#27: the Access tab — one key per identity for all its apps: give access in three steps, the overview matrix, a cell's sheet (since, last use, level, rotate, revoke), the app's check POST /api/introspect, agent identities hidden from the login picker, an inbox icon in the header's icon style (gate: tests/access.mjs)mre
  • 436206fcident#47: deploy.sh runs the sign-in gate on the deploy's own port slot, like the sessionwrites and docs gates (the default 8700 can be taken by another process)mre
  • 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