@softistx/janus 0.0.0-stage → 0.73.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (911) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2928 -2
  3. package/dist/auth/api-keys/authenticate-key.d.ts +21 -0
  4. package/dist/auth/api-keys/authenticate-key.d.ts.map +1 -0
  5. package/dist/auth/api-keys/bound.d.ts +11 -0
  6. package/dist/auth/api-keys/bound.d.ts.map +1 -0
  7. package/dist/auth/api-keys/count.d.ts +8 -0
  8. package/dist/auth/api-keys/count.d.ts.map +1 -0
  9. package/dist/auth/api-keys/create/checks.d.ts +42 -0
  10. package/dist/auth/api-keys/create/checks.d.ts.map +1 -0
  11. package/dist/auth/api-keys/create/index.d.ts +10 -0
  12. package/dist/auth/api-keys/create/index.d.ts.map +1 -0
  13. package/dist/auth/api-keys/events.d.ts +22 -0
  14. package/dist/auth/api-keys/events.d.ts.map +1 -0
  15. package/dist/auth/api-keys/expiry.d.ts +11 -0
  16. package/dist/auth/api-keys/expiry.d.ts.map +1 -0
  17. package/dist/auth/api-keys/flows.d.ts +13 -0
  18. package/dist/auth/api-keys/flows.d.ts.map +1 -0
  19. package/dist/auth/api-keys/index.d.ts +11 -0
  20. package/dist/auth/api-keys/index.d.ts.map +1 -0
  21. package/dist/auth/api-keys/read.d.ts +10 -0
  22. package/dist/auth/api-keys/read.d.ts.map +1 -0
  23. package/dist/auth/api-keys/shape.d.ts +24 -0
  24. package/dist/auth/api-keys/shape.d.ts.map +1 -0
  25. package/dist/auth/api-keys/to-api-key.d.ts +8 -0
  26. package/dist/auth/api-keys/to-api-key.d.ts.map +1 -0
  27. package/dist/auth/api-keys/token.d.ts +23 -0
  28. package/dist/auth/api-keys/token.d.ts.map +1 -0
  29. package/dist/auth/api-keys/user-bound.d.ts +10 -0
  30. package/dist/auth/api-keys/user-bound.d.ts.map +1 -0
  31. package/dist/auth/at.d.ts +9 -0
  32. package/dist/auth/at.d.ts.map +1 -0
  33. package/dist/auth/avatar/any-type.d.ts +13 -0
  34. package/dist/auth/avatar/any-type.d.ts.map +1 -0
  35. package/dist/auth/avatar/flows.d.ts +7 -0
  36. package/dist/auth/avatar/flows.d.ts.map +1 -0
  37. package/dist/auth/avatar/id.d.ts +10 -0
  38. package/dist/auth/avatar/id.d.ts.map +1 -0
  39. package/dist/auth/avatar/index.d.ts +7 -0
  40. package/dist/auth/avatar/index.d.ts.map +1 -0
  41. package/dist/auth/avatar/remove.d.ts +10 -0
  42. package/dist/auth/avatar/remove.d.ts.map +1 -0
  43. package/dist/auth/avatar/set.d.ts +12 -0
  44. package/dist/auth/avatar/set.d.ts.map +1 -0
  45. package/dist/auth/concurrency-limit.d.ts +13 -0
  46. package/dist/auth/concurrency-limit.d.ts.map +1 -0
  47. package/dist/auth/config/api-keys-config.d.ts +33 -0
  48. package/dist/auth/config/api-keys-config.d.ts.map +1 -0
  49. package/dist/auth/config/hasher.d.ts +22 -0
  50. package/dist/auth/config/hasher.d.ts.map +1 -0
  51. package/dist/auth/config/index.d.ts +24 -0
  52. package/dist/auth/config/index.d.ts.map +1 -0
  53. package/dist/auth/config/invitations-config.d.ts +74 -0
  54. package/dist/auth/config/invitations-config.d.ts.map +1 -0
  55. package/dist/auth/config/janus-config.d.ts +233 -0
  56. package/dist/auth/config/janus-config.d.ts.map +1 -0
  57. package/dist/auth/config/magic-link-config.d.ts +6 -0
  58. package/dist/auth/config/magic-link-config.d.ts.map +1 -0
  59. package/dist/auth/config/names.d.ts +9 -0
  60. package/dist/auth/config/names.d.ts.map +1 -0
  61. package/dist/auth/config/normalize.d.ts +26 -0
  62. package/dist/auth/config/normalize.d.ts.map +1 -0
  63. package/dist/auth/config/passkeys-config.d.ts +49 -0
  64. package/dist/auth/config/passkeys-config.d.ts.map +1 -0
  65. package/dist/auth/config/password-config.d.ts +22 -0
  66. package/dist/auth/config/password-config.d.ts.map +1 -0
  67. package/dist/auth/config/reserved.d.ts +14 -0
  68. package/dist/auth/config/reserved.d.ts.map +1 -0
  69. package/dist/auth/config/resolve-api-keys.d.ts +5 -0
  70. package/dist/auth/config/resolve-api-keys.d.ts.map +1 -0
  71. package/dist/auth/config/resolve-config.d.ts +9 -0
  72. package/dist/auth/config/resolve-config.d.ts.map +1 -0
  73. package/dist/auth/config/resolve-cookie.d.ts +5 -0
  74. package/dist/auth/config/resolve-cookie.d.ts.map +1 -0
  75. package/dist/auth/config/resolve-devices.d.ts +5 -0
  76. package/dist/auth/config/resolve-devices.d.ts.map +1 -0
  77. package/dist/auth/config/resolve-invitation-types.d.ts +5 -0
  78. package/dist/auth/config/resolve-invitation-types.d.ts.map +1 -0
  79. package/dist/auth/config/resolve-invitations.d.ts +5 -0
  80. package/dist/auth/config/resolve-invitations.d.ts.map +1 -0
  81. package/dist/auth/config/resolve-magic-link.d.ts +4 -0
  82. package/dist/auth/config/resolve-magic-link.d.ts.map +1 -0
  83. package/dist/auth/config/resolve-passkeys.d.ts +5 -0
  84. package/dist/auth/config/resolve-passkeys.d.ts.map +1 -0
  85. package/dist/auth/config/resolve-second-factor.d.ts +5 -0
  86. package/dist/auth/config/resolve-second-factor.d.ts.map +1 -0
  87. package/dist/auth/config/resolve-social.d.ts +17 -0
  88. package/dist/auth/config/resolve-social.d.ts.map +1 -0
  89. package/dist/auth/config/resolve-throttle.d.ts +37 -0
  90. package/dist/auth/config/resolve-throttle.d.ts.map +1 -0
  91. package/dist/auth/config/resolve-type.d.ts +6 -0
  92. package/dist/auth/config/resolve-type.d.ts.map +1 -0
  93. package/dist/auth/config/resolved-config.d.ts +126 -0
  94. package/dist/auth/config/resolved-config.d.ts.map +1 -0
  95. package/dist/auth/config/social-config.d.ts +154 -0
  96. package/dist/auth/config/social-config.d.ts.map +1 -0
  97. package/dist/auth/config/user-type.d.ts +79 -0
  98. package/dist/auth/config/user-type.d.ts.map +1 -0
  99. package/dist/auth/config/warn-throttle-window.d.ts +14 -0
  100. package/dist/auth/config/warn-throttle-window.d.ts.map +1 -0
  101. package/dist/auth/context/create-context.d.ts +31 -0
  102. package/dist/auth/context/create-context.d.ts.map +1 -0
  103. package/dist/auth/context/index.d.ts +17 -0
  104. package/dist/auth/context/index.d.ts.map +1 -0
  105. package/dist/auth/context/logins.d.ts +28 -0
  106. package/dist/auth/context/logins.d.ts.map +1 -0
  107. package/dist/auth/context/password.d.ts +34 -0
  108. package/dist/auth/context/password.d.ts.map +1 -0
  109. package/dist/auth/context/records.d.ts +27 -0
  110. package/dist/auth/context/records.d.ts.map +1 -0
  111. package/dist/auth/context/user.d.ts +21 -0
  112. package/dist/auth/context/user.d.ts.map +1 -0
  113. package/dist/auth/context/validate-fields.d.ts +12 -0
  114. package/dist/auth/context/validate-fields.d.ts.map +1 -0
  115. package/dist/auth/counter-key.d.ts +20 -0
  116. package/dist/auth/counter-key.d.ts.map +1 -0
  117. package/dist/auth/derived-keys.d.ts +9 -0
  118. package/dist/auth/derived-keys.d.ts.map +1 -0
  119. package/dist/auth/devices/cookie.d.ts +56 -0
  120. package/dist/auth/devices/cookie.d.ts.map +1 -0
  121. package/dist/auth/devices/hint.d.ts +42 -0
  122. package/dist/auth/devices/hint.d.ts.map +1 -0
  123. package/dist/auth/devices/index.d.ts +11 -0
  124. package/dist/auth/devices/index.d.ts.map +1 -0
  125. package/dist/auth/devices/report.d.ts +11 -0
  126. package/dist/auth/devices/report.d.ts.map +1 -0
  127. package/dist/auth/devices/token.d.ts +13 -0
  128. package/dist/auth/devices/token.d.ts.map +1 -0
  129. package/dist/auth/email-flows/any-type-change-email.d.ts +18 -0
  130. package/dist/auth/email-flows/any-type-change-email.d.ts.map +1 -0
  131. package/dist/auth/email-flows/any-type-reset-password.d.ts +19 -0
  132. package/dist/auth/email-flows/any-type-reset-password.d.ts.map +1 -0
  133. package/dist/auth/email-flows/any-type-verify-email.d.ts +18 -0
  134. package/dist/auth/email-flows/any-type-verify-email.d.ts.map +1 -0
  135. package/dist/auth/email-flows/change-email-token.d.ts +47 -0
  136. package/dist/auth/email-flows/change-email-token.d.ts.map +1 -0
  137. package/dist/auth/email-flows/change-email.d.ts +17 -0
  138. package/dist/auth/email-flows/change-email.d.ts.map +1 -0
  139. package/dist/auth/email-flows/confirm-reset.d.ts +16 -0
  140. package/dist/auth/email-flows/confirm-reset.d.ts.map +1 -0
  141. package/dist/auth/email-flows/email-token.d.ts +30 -0
  142. package/dist/auth/email-flows/email-token.d.ts.map +1 -0
  143. package/dist/auth/email-flows/flows.d.ts +13 -0
  144. package/dist/auth/email-flows/flows.d.ts.map +1 -0
  145. package/dist/auth/email-flows/index.d.ts +10 -0
  146. package/dist/auth/email-flows/index.d.ts.map +1 -0
  147. package/dist/auth/email-flows/owner-of.d.ts +17 -0
  148. package/dist/auth/email-flows/owner-of.d.ts.map +1 -0
  149. package/dist/auth/email-flows/prove-first.d.ts +45 -0
  150. package/dist/auth/email-flows/prove-first.d.ts.map +1 -0
  151. package/dist/auth/email-flows/reset-password.d.ts +17 -0
  152. package/dist/auth/email-flows/reset-password.d.ts.map +1 -0
  153. package/dist/auth/email-flows/set-email-verified.d.ts +19 -0
  154. package/dist/auth/email-flows/set-email-verified.d.ts.map +1 -0
  155. package/dist/auth/email-flows/verify-email.d.ts +25 -0
  156. package/dist/auth/email-flows/verify-email.d.ts.map +1 -0
  157. package/dist/auth/email-sign-in.d.ts +51 -0
  158. package/dist/auth/email-sign-in.d.ts.map +1 -0
  159. package/dist/auth/events.d.ts +166 -0
  160. package/dist/auth/events.d.ts.map +1 -0
  161. package/dist/auth/first-proof.d.ts +43 -0
  162. package/dist/auth/first-proof.d.ts.map +1 -0
  163. package/dist/auth/hashers.d.ts +52 -0
  164. package/dist/auth/hashers.d.ts.map +1 -0
  165. package/dist/auth/index.d.ts +22 -0
  166. package/dist/auth/index.d.ts.map +1 -0
  167. package/dist/auth/invitations/accept.d.ts +10 -0
  168. package/dist/auth/invitations/accept.d.ts.map +1 -0
  169. package/dist/auth/invitations/change-pending.d.ts +17 -0
  170. package/dist/auth/invitations/change-pending.d.ts.map +1 -0
  171. package/dist/auth/invitations/claim.d.ts +31 -0
  172. package/dist/auth/invitations/claim.d.ts.map +1 -0
  173. package/dist/auth/invitations/events.d.ts +46 -0
  174. package/dist/auth/invitations/events.d.ts.map +1 -0
  175. package/dist/auth/invitations/find-invitee.d.ts +20 -0
  176. package/dist/auth/invitations/find-invitee.d.ts.map +1 -0
  177. package/dist/auth/invitations/find-pending.d.ts +5 -0
  178. package/dist/auth/invitations/find-pending.d.ts.map +1 -0
  179. package/dist/auth/invitations/flows.d.ts +7 -0
  180. package/dist/auth/invitations/flows.d.ts.map +1 -0
  181. package/dist/auth/invitations/history-input.d.ts +29 -0
  182. package/dist/auth/invitations/history-input.d.ts.map +1 -0
  183. package/dist/auth/invitations/history.d.ts +10 -0
  184. package/dist/auth/invitations/history.d.ts.map +1 -0
  185. package/dist/auth/invitations/index.d.ts +11 -0
  186. package/dist/auth/invitations/index.d.ts.map +1 -0
  187. package/dist/auth/invitations/input.d.ts +30 -0
  188. package/dist/auth/invitations/input.d.ts.map +1 -0
  189. package/dist/auth/invitations/invited-type.d.ts +22 -0
  190. package/dist/auth/invitations/invited-type.d.ts.map +1 -0
  191. package/dist/auth/invitations/invitee.d.ts +11 -0
  192. package/dist/auth/invitations/invitee.d.ts.map +1 -0
  193. package/dist/auth/invitations/issue.d.ts +9 -0
  194. package/dist/auth/invitations/issue.d.ts.map +1 -0
  195. package/dist/auth/invitations/limit.d.ts +7 -0
  196. package/dist/auth/invitations/limit.d.ts.map +1 -0
  197. package/dist/auth/invitations/password-invitee.d.ts +18 -0
  198. package/dist/auth/invitations/password-invitee.d.ts.map +1 -0
  199. package/dist/auth/invitations/passwordless-invitee.d.ts +13 -0
  200. package/dist/auth/invitations/passwordless-invitee.d.ts.map +1 -0
  201. package/dist/auth/invitations/preview.d.ts +8 -0
  202. package/dist/auth/invitations/preview.d.ts.map +1 -0
  203. package/dist/auth/invitations/read.d.ts +10 -0
  204. package/dist/auth/invitations/read.d.ts.map +1 -0
  205. package/dist/auth/invitations/resend.d.ts +12 -0
  206. package/dist/auth/invitations/resend.d.ts.map +1 -0
  207. package/dist/auth/invitations/to-invitation.d.ts +11 -0
  208. package/dist/auth/invitations/to-invitation.d.ts.map +1 -0
  209. package/dist/auth/invitations/write.d.ts +17 -0
  210. package/dist/auth/invitations/write.d.ts.map +1 -0
  211. package/dist/auth/issuers/cache.d.ts +21 -0
  212. package/dist/auth/issuers/cache.d.ts.map +1 -0
  213. package/dist/auth/issuers/create.d.ts +18 -0
  214. package/dist/auth/issuers/create.d.ts.map +1 -0
  215. package/dist/auth/issuers/index.d.ts +3 -0
  216. package/dist/auth/issuers/index.d.ts.map +1 -0
  217. package/dist/auth/issuers/types.d.ts +45 -0
  218. package/dist/auth/issuers/types.d.ts.map +1 -0
  219. package/dist/auth/janus.d.ts +39 -0
  220. package/dist/auth/janus.d.ts.map +1 -0
  221. package/dist/auth/magic-link.d.ts +25 -0
  222. package/dist/auth/magic-link.d.ts.map +1 -0
  223. package/dist/auth/mail-requests.d.ts +55 -0
  224. package/dist/auth/mail-requests.d.ts.map +1 -0
  225. package/dist/auth/one-time/codes.d.ts +46 -0
  226. package/dist/auth/one-time/codes.d.ts.map +1 -0
  227. package/dist/auth/one-time/index.d.ts +15 -0
  228. package/dist/auth/one-time/index.d.ts.map +1 -0
  229. package/dist/auth/one-time/issue.d.ts +45 -0
  230. package/dist/auth/one-time/issue.d.ts.map +1 -0
  231. package/dist/auth/one-time/refusals.d.ts +26 -0
  232. package/dist/auth/one-time/refusals.d.ts.map +1 -0
  233. package/dist/auth/one-time/spend.d.ts +24 -0
  234. package/dist/auth/one-time/spend.d.ts.map +1 -0
  235. package/dist/auth/one-time/window.d.ts +50 -0
  236. package/dist/auth/one-time/window.d.ts.map +1 -0
  237. package/dist/auth/outage.d.ts +66 -0
  238. package/dist/auth/outage.d.ts.map +1 -0
  239. package/dist/auth/parse-sealing-keys.d.ts +26 -0
  240. package/dist/auth/parse-sealing-keys.d.ts.map +1 -0
  241. package/dist/auth/passkeys/assert.d.ts +51 -0
  242. package/dist/auth/passkeys/assert.d.ts.map +1 -0
  243. package/dist/auth/passkeys/assertion-options.d.ts +9 -0
  244. package/dist/auth/passkeys/assertion-options.d.ts.map +1 -0
  245. package/dist/auth/passkeys/challenge.d.ts +19 -0
  246. package/dist/auth/passkeys/challenge.d.ts.map +1 -0
  247. package/dist/auth/passkeys/commit.d.ts +33 -0
  248. package/dist/auth/passkeys/commit.d.ts.map +1 -0
  249. package/dist/auth/passkeys/flows.d.ts +13 -0
  250. package/dist/auth/passkeys/flows.d.ts.map +1 -0
  251. package/dist/auth/passkeys/index.d.ts +12 -0
  252. package/dist/auth/passkeys/index.d.ts.map +1 -0
  253. package/dist/auth/passkeys/manage.d.ts +11 -0
  254. package/dist/auth/passkeys/manage.d.ts.map +1 -0
  255. package/dist/auth/passkeys/name.d.ts +4 -0
  256. package/dist/auth/passkeys/name.d.ts.map +1 -0
  257. package/dist/auth/passkeys/register.d.ts +20 -0
  258. package/dist/auth/passkeys/register.d.ts.map +1 -0
  259. package/dist/auth/passkeys/registration-options.d.ts +22 -0
  260. package/dist/auth/passkeys/registration-options.d.ts.map +1 -0
  261. package/dist/auth/passkeys/remove-all.d.ts +26 -0
  262. package/dist/auth/passkeys/remove-all.d.ts.map +1 -0
  263. package/dist/auth/passkeys/sign-in-options.d.ts +12 -0
  264. package/dist/auth/passkeys/sign-in-options.d.ts.map +1 -0
  265. package/dist/auth/passkeys/sign-in.d.ts +21 -0
  266. package/dist/auth/passkeys/sign-in.d.ts.map +1 -0
  267. package/dist/auth/passkeys/verifier.d.ts +113 -0
  268. package/dist/auth/passkeys/verifier.d.ts.map +1 -0
  269. package/dist/auth/passkeys/view.d.ts +5 -0
  270. package/dist/auth/passkeys/view.d.ts.map +1 -0
  271. package/dist/auth/passkeys/wiring.d.ts +24 -0
  272. package/dist/auth/passkeys/wiring.d.ts.map +1 -0
  273. package/dist/auth/password-written.d.ts +55 -0
  274. package/dist/auth/password-written.d.ts.map +1 -0
  275. package/dist/auth/port/assert-api-keys.d.ts +21 -0
  276. package/dist/auth/port/assert-api-keys.d.ts.map +1 -0
  277. package/dist/auth/port/assert-invitations.d.ts +15 -0
  278. package/dist/auth/port/assert-invitations.d.ts.map +1 -0
  279. package/dist/auth/port/assert-stores.d.ts +16 -0
  280. package/dist/auth/port/assert-stores.d.ts.map +1 -0
  281. package/dist/auth/port/memory/api-keys/capabilities.d.ts +8 -0
  282. package/dist/auth/port/memory/api-keys/capabilities.d.ts.map +1 -0
  283. package/dist/auth/port/memory/api-keys/index.d.ts +13 -0
  284. package/dist/auth/port/memory/api-keys/index.d.ts.map +1 -0
  285. package/dist/auth/port/memory/api-keys/pages.d.ts +7 -0
  286. package/dist/auth/port/memory/api-keys/pages.d.ts.map +1 -0
  287. package/dist/auth/port/memory/copy.d.ts +6 -0
  288. package/dist/auth/port/memory/copy.d.ts.map +1 -0
  289. package/dist/auth/port/memory/index.d.ts +10 -0
  290. package/dist/auth/port/memory/index.d.ts.map +1 -0
  291. package/dist/auth/port/memory/invitations-pending.d.ts +6 -0
  292. package/dist/auth/port/memory/invitations-pending.d.ts.map +1 -0
  293. package/dist/auth/port/memory/invitations.d.ts +12 -0
  294. package/dist/auth/port/memory/invitations.d.ts.map +1 -0
  295. package/dist/auth/port/memory/passkeys.d.ts +9 -0
  296. package/dist/auth/port/memory/passkeys.d.ts.map +1 -0
  297. package/dist/auth/port/memory/sessions.d.ts +4 -0
  298. package/dist/auth/port/memory/sessions.d.ts.map +1 -0
  299. package/dist/auth/port/memory/social-links.d.ts +10 -0
  300. package/dist/auth/port/memory/social-links.d.ts.map +1 -0
  301. package/dist/auth/port/memory/stores.d.ts +26 -0
  302. package/dist/auth/port/memory/stores.d.ts.map +1 -0
  303. package/dist/auth/port/memory/tokens.d.ts +4 -0
  304. package/dist/auth/port/memory/tokens.d.ts.map +1 -0
  305. package/dist/auth/port/memory/user-index.d.ts +20 -0
  306. package/dist/auth/port/memory/user-index.d.ts.map +1 -0
  307. package/dist/auth/port/memory/user-update.d.ts +10 -0
  308. package/dist/auth/port/memory/user-update.d.ts.map +1 -0
  309. package/dist/auth/port/memory/users.d.ts +4 -0
  310. package/dist/auth/port/memory/users.d.ts.map +1 -0
  311. package/dist/auth/port/types/api-keys.d.ts +199 -0
  312. package/dist/auth/port/types/api-keys.d.ts.map +1 -0
  313. package/dist/auth/port/types/credentials.d.ts +46 -0
  314. package/dist/auth/port/types/credentials.d.ts.map +1 -0
  315. package/dist/auth/port/types/index.d.ts +75 -0
  316. package/dist/auth/port/types/index.d.ts.map +1 -0
  317. package/dist/auth/port/types/invitations/index.d.ts +15 -0
  318. package/dist/auth/port/types/invitations/index.d.ts.map +1 -0
  319. package/dist/auth/port/types/invitations/page.d.ts +52 -0
  320. package/dist/auth/port/types/invitations/page.d.ts.map +1 -0
  321. package/dist/auth/port/types/invitations/records.d.ts +101 -0
  322. package/dist/auth/port/types/invitations/records.d.ts.map +1 -0
  323. package/dist/auth/port/types/invitations/store.d.ts +82 -0
  324. package/dist/auth/port/types/invitations/store.d.ts.map +1 -0
  325. package/dist/auth/port/types/json.d.ts +27 -0
  326. package/dist/auth/port/types/json.d.ts.map +1 -0
  327. package/dist/auth/port/types/passkeys.d.ts +94 -0
  328. package/dist/auth/port/types/passkeys.d.ts.map +1 -0
  329. package/dist/auth/port/types/sessions.d.ts +142 -0
  330. package/dist/auth/port/types/sessions.d.ts.map +1 -0
  331. package/dist/auth/port/types/social-links.d.ts +64 -0
  332. package/dist/auth/port/types/social-links.d.ts.map +1 -0
  333. package/dist/auth/port/types/stores.d.ts +48 -0
  334. package/dist/auth/port/types/stores.d.ts.map +1 -0
  335. package/dist/auth/port/types/tokens.d.ts +168 -0
  336. package/dist/auth/port/types/tokens.d.ts.map +1 -0
  337. package/dist/auth/port/types/users.d.ts +260 -0
  338. package/dist/auth/port/types/users.d.ts.map +1 -0
  339. package/dist/auth/prepared.d.ts +21 -0
  340. package/dist/auth/prepared.d.ts.map +1 -0
  341. package/dist/auth/proven-sign-in.d.ts +22 -0
  342. package/dist/auth/proven-sign-in.d.ts.map +1 -0
  343. package/dist/auth/sealer-for.d.ts +44 -0
  344. package/dist/auth/sealer-for.d.ts.map +1 -0
  345. package/dist/auth/sealing.d.ts +36 -0
  346. package/dist/auth/sealing.d.ts.map +1 -0
  347. package/dist/auth/second-factor/activate.d.ts +9 -0
  348. package/dist/auth/second-factor/activate.d.ts.map +1 -0
  349. package/dist/auth/second-factor/app-code-attempts.d.ts +47 -0
  350. package/dist/auth/second-factor/app-code-attempts.d.ts.map +1 -0
  351. package/dist/auth/second-factor/challenge.d.ts +15 -0
  352. package/dist/auth/second-factor/challenge.d.ts.map +1 -0
  353. package/dist/auth/second-factor/codes-left.d.ts +14 -0
  354. package/dist/auth/second-factor/codes-left.d.ts.map +1 -0
  355. package/dist/auth/second-factor/disable.d.ts +10 -0
  356. package/dist/auth/second-factor/disable.d.ts.map +1 -0
  357. package/dist/auth/second-factor/enroll.d.ts +6 -0
  358. package/dist/auth/second-factor/enroll.d.ts.map +1 -0
  359. package/dist/auth/second-factor/factor.d.ts +33 -0
  360. package/dist/auth/second-factor/factor.d.ts.map +1 -0
  361. package/dist/auth/second-factor/flows.d.ts +36 -0
  362. package/dist/auth/second-factor/flows.d.ts.map +1 -0
  363. package/dist/auth/second-factor/lifecycle.d.ts +14 -0
  364. package/dist/auth/second-factor/lifecycle.d.ts.map +1 -0
  365. package/dist/auth/second-factor/passkey-confirm.d.ts +21 -0
  366. package/dist/auth/second-factor/passkey-confirm.d.ts.map +1 -0
  367. package/dist/auth/second-factor/recovery-codes.d.ts +36 -0
  368. package/dist/auth/second-factor/recovery-codes.d.ts.map +1 -0
  369. package/dist/auth/second-factor/recovery.d.ts +20 -0
  370. package/dist/auth/second-factor/recovery.d.ts.map +1 -0
  371. package/dist/auth/second-factor/redeem.d.ts +42 -0
  372. package/dist/auth/second-factor/redeem.d.ts.map +1 -0
  373. package/dist/auth/second-factor/refusal.d.ts +6 -0
  374. package/dist/auth/second-factor/refusal.d.ts.map +1 -0
  375. package/dist/auth/second-factor/regenerate.d.ts +12 -0
  376. package/dist/auth/second-factor/regenerate.d.ts.map +1 -0
  377. package/dist/auth/second-factor/reseal.d.ts +17 -0
  378. package/dist/auth/second-factor/reseal.d.ts.map +1 -0
  379. package/dist/auth/second-factor/spend-recovery-code.d.ts +15 -0
  380. package/dist/auth/second-factor/spend-recovery-code.d.ts.map +1 -0
  381. package/dist/auth/secrets.d.ts +17 -0
  382. package/dist/auth/secrets.d.ts.map +1 -0
  383. package/dist/auth/sessions/amr.d.ts +36 -0
  384. package/dist/auth/sessions/amr.d.ts.map +1 -0
  385. package/dist/auth/sessions/authenticate.d.ts +12 -0
  386. package/dist/auth/sessions/authenticate.d.ts.map +1 -0
  387. package/dist/auth/sessions/collect-expired.d.ts +15 -0
  388. package/dist/auth/sessions/collect-expired.d.ts.map +1 -0
  389. package/dist/auth/sessions/cookie.d.ts +9 -0
  390. package/dist/auth/sessions/cookie.d.ts.map +1 -0
  391. package/dist/auth/sessions/fresh.d.ts +35 -0
  392. package/dist/auth/sessions/fresh.d.ts.map +1 -0
  393. package/dist/auth/sessions/index.d.ts +12 -0
  394. package/dist/auth/sessions/index.d.ts.map +1 -0
  395. package/dist/auth/sessions/open-session.d.ts +22 -0
  396. package/dist/auth/sessions/open-session.d.ts.map +1 -0
  397. package/dist/auth/sessions/presented-token.d.ts +25 -0
  398. package/dist/auth/sessions/presented-token.d.ts.map +1 -0
  399. package/dist/auth/sessions/shared-api.d.ts +17 -0
  400. package/dist/auth/sessions/shared-api.d.ts.map +1 -0
  401. package/dist/auth/sessions/standing.d.ts +32 -0
  402. package/dist/auth/sessions/standing.d.ts.map +1 -0
  403. package/dist/auth/shared-api.d.ts +139 -0
  404. package/dist/auth/shared-api.d.ts.map +1 -0
  405. package/dist/auth/sign-in-attempts.d.ts +45 -0
  406. package/dist/auth/sign-in-attempts.d.ts.map +1 -0
  407. package/dist/auth/sign-in-code.d.ts +26 -0
  408. package/dist/auth/sign-in-code.d.ts.map +1 -0
  409. package/dist/auth/social/attach.d.ts +31 -0
  410. package/dist/auth/social/attach.d.ts.map +1 -0
  411. package/dist/auth/social/begin.d.ts +30 -0
  412. package/dist/auth/social/begin.d.ts.map +1 -0
  413. package/dist/auth/social/complete-link.d.ts +17 -0
  414. package/dist/auth/social/complete-link.d.ts.map +1 -0
  415. package/dist/auth/social/complete.d.ts +54 -0
  416. package/dist/auth/social/complete.d.ts.map +1 -0
  417. package/dist/auth/social/cookie.d.ts +16 -0
  418. package/dist/auth/social/cookie.d.ts.map +1 -0
  419. package/dist/auth/social/find-provider.d.ts +23 -0
  420. package/dist/auth/social/find-provider.d.ts.map +1 -0
  421. package/dist/auth/social/finish.d.ts +60 -0
  422. package/dist/auth/social/finish.d.ts.map +1 -0
  423. package/dist/auth/social/flow-cookie-value.d.ts +26 -0
  424. package/dist/auth/social/flow-cookie-value.d.ts.map +1 -0
  425. package/dist/auth/social/flow-secret.d.ts +40 -0
  426. package/dist/auth/social/flow-secret.d.ts.map +1 -0
  427. package/dist/auth/social/index.d.ts +19 -0
  428. package/dist/auth/social/index.d.ts.map +1 -0
  429. package/dist/auth/social/link-holder.d.ts +33 -0
  430. package/dist/auth/social/link-holder.d.ts.map +1 -0
  431. package/dist/auth/social/provider-call.d.ts +31 -0
  432. package/dist/auth/social/provider-call.d.ts.map +1 -0
  433. package/dist/auth/social/redeem.d.ts +45 -0
  434. package/dist/auth/social/redeem.d.ts.map +1 -0
  435. package/dist/auth/social/return-to.d.ts +18 -0
  436. package/dist/auth/social/return-to.d.ts.map +1 -0
  437. package/dist/auth/social/sign-in.d.ts +41 -0
  438. package/dist/auth/social/sign-in.d.ts.map +1 -0
  439. package/dist/auth/social/sign-up.d.ts +37 -0
  440. package/dist/auth/social/sign-up.d.ts.map +1 -0
  441. package/dist/auth/social/start.d.ts +21 -0
  442. package/dist/auth/social/start.d.ts.map +1 -0
  443. package/dist/auth/social/step-up-proof.d.ts +26 -0
  444. package/dist/auth/social/step-up-proof.d.ts.map +1 -0
  445. package/dist/auth/social/step-up-request.d.ts +28 -0
  446. package/dist/auth/social/step-up-request.d.ts.map +1 -0
  447. package/dist/auth/social/step-up.d.ts +19 -0
  448. package/dist/auth/social/step-up.d.ts.map +1 -0
  449. package/dist/auth/social/types-of.d.ts +12 -0
  450. package/dist/auth/social/types-of.d.ts.map +1 -0
  451. package/dist/auth/social/unlink.d.ts +16 -0
  452. package/dist/auth/social/unlink.d.ts.map +1 -0
  453. package/dist/auth/social/wiring.d.ts +10 -0
  454. package/dist/auth/social/wiring.d.ts.map +1 -0
  455. package/dist/auth/standard-schema.d.ts +41 -0
  456. package/dist/auth/standard-schema.d.ts.map +1 -0
  457. package/dist/auth/step-up/codes.d.ts +35 -0
  458. package/dist/auth/step-up/codes.d.ts.map +1 -0
  459. package/dist/auth/step-up/flows.d.ts +18 -0
  460. package/dist/auth/step-up/flows.d.ts.map +1 -0
  461. package/dist/auth/step-up/open.d.ts +23 -0
  462. package/dist/auth/step-up/open.d.ts.map +1 -0
  463. package/dist/auth/step-up/passkey.d.ts +31 -0
  464. package/dist/auth/step-up/passkey.d.ts.map +1 -0
  465. package/dist/auth/step-up/request.d.ts +15 -0
  466. package/dist/auth/step-up/request.d.ts.map +1 -0
  467. package/dist/auth/step-up/spend.d.ts +4 -0
  468. package/dist/auth/step-up/spend.d.ts.map +1 -0
  469. package/dist/auth/totp.d.ts +36 -0
  470. package/dist/auth/totp.d.ts.map +1 -0
  471. package/dist/auth/types/api-keys-of.d.ts +19 -0
  472. package/dist/auth/types/api-keys-of.d.ts.map +1 -0
  473. package/dist/auth/types/api-keys.d.ts +164 -0
  474. package/dist/auth/types/api-keys.d.ts.map +1 -0
  475. package/dist/auth/types/avatar.d.ts +72 -0
  476. package/dist/auth/types/avatar.d.ts.map +1 -0
  477. package/dist/auth/types/change-email.d.ts +82 -0
  478. package/dist/auth/types/change-email.d.ts.map +1 -0
  479. package/dist/auth/types/checks.d.ts +147 -0
  480. package/dist/auth/types/checks.d.ts.map +1 -0
  481. package/dist/auth/types/email-flows.d.ts +117 -0
  482. package/dist/auth/types/email-flows.d.ts.map +1 -0
  483. package/dist/auth/types/find-by-email.d.ts +31 -0
  484. package/dist/auth/types/find-by-email.d.ts.map +1 -0
  485. package/dist/auth/types/find-or-create.d.ts +59 -0
  486. package/dist/auth/types/find-or-create.d.ts.map +1 -0
  487. package/dist/auth/types/index.d.ts +38 -0
  488. package/dist/auth/types/index.d.ts.map +1 -0
  489. package/dist/auth/types/inference.d.ts +62 -0
  490. package/dist/auth/types/inference.d.ts.map +1 -0
  491. package/dist/auth/types/invitations/api.d.ts +203 -0
  492. package/dist/auth/types/invitations/api.d.ts.map +1 -0
  493. package/dist/auth/types/invitations/history.d.ts +87 -0
  494. package/dist/auth/types/invitations/history.d.ts.map +1 -0
  495. package/dist/auth/types/invitations/index.d.ts +10 -0
  496. package/dist/auth/types/invitations/index.d.ts.map +1 -0
  497. package/dist/auth/types/invitations/invitation.d.ts +76 -0
  498. package/dist/auth/types/invitations/invitation.d.ts.map +1 -0
  499. package/dist/auth/types/invitations/issue-type.d.ts +15 -0
  500. package/dist/auth/types/invitations/issue-type.d.ts.map +1 -0
  501. package/dist/auth/types/invitations-of.d.ts +26 -0
  502. package/dist/auth/types/invitations-of.d.ts.map +1 -0
  503. package/dist/auth/types/janus.d.ts +51 -0
  504. package/dist/auth/types/janus.d.ts.map +1 -0
  505. package/dist/auth/types/magic-link.d.ts +69 -0
  506. package/dist/auth/types/magic-link.d.ts.map +1 -0
  507. package/dist/auth/types/passkeys.d.ts +183 -0
  508. package/dist/auth/types/passkeys.d.ts.map +1 -0
  509. package/dist/auth/types/password.d.ts +113 -0
  510. package/dist/auth/types/password.d.ts.map +1 -0
  511. package/dist/auth/types/prepared.d.ts +68 -0
  512. package/dist/auth/types/prepared.d.ts.map +1 -0
  513. package/dist/auth/types/proven-sign-in.d.ts +43 -0
  514. package/dist/auth/types/proven-sign-in.d.ts.map +1 -0
  515. package/dist/auth/types/reset-password.d.ts +46 -0
  516. package/dist/auth/types/reset-password.d.ts.map +1 -0
  517. package/dist/auth/types/second-factor.d.ts +164 -0
  518. package/dist/auth/types/second-factor.d.ts.map +1 -0
  519. package/dist/auth/types/session.d.ts +68 -0
  520. package/dist/auth/types/session.d.ts.map +1 -0
  521. package/dist/auth/types/shared-api.d.ts +96 -0
  522. package/dist/auth/types/shared-api.d.ts.map +1 -0
  523. package/dist/auth/types/sign-in.d.ts +102 -0
  524. package/dist/auth/types/sign-in.d.ts.map +1 -0
  525. package/dist/auth/types/social-flow.d.ts +28 -0
  526. package/dist/auth/types/social-flow.d.ts.map +1 -0
  527. package/dist/auth/types/social-step-up.d.ts +38 -0
  528. package/dist/auth/types/social-step-up.d.ts.map +1 -0
  529. package/dist/auth/types/social.d.ts +193 -0
  530. package/dist/auth/types/social.d.ts.map +1 -0
  531. package/dist/auth/types/step-up.d.ts +133 -0
  532. package/dist/auth/types/step-up.d.ts.map +1 -0
  533. package/dist/auth/types/type-api.d.ts +29 -0
  534. package/dist/auth/types/type-api.d.ts.map +1 -0
  535. package/dist/auth/types/user-type.d.ts +106 -0
  536. package/dist/auth/types/user-type.d.ts.map +1 -0
  537. package/dist/auth/types/user.d.ts +62 -0
  538. package/dist/auth/types/user.d.ts.map +1 -0
  539. package/dist/auth/types/verify-email.d.ts +190 -0
  540. package/dist/auth/types/verify-email.d.ts.map +1 -0
  541. package/dist/auth/users/any-type-api.d.ts +6 -0
  542. package/dist/auth/users/any-type-api.d.ts.map +1 -0
  543. package/dist/auth/users/by-login.d.ts +10 -0
  544. package/dist/auth/users/by-login.d.ts.map +1 -0
  545. package/dist/auth/users/change-password.d.ts +26 -0
  546. package/dist/auth/users/change-password.d.ts.map +1 -0
  547. package/dist/auth/users/delete.d.ts +10 -0
  548. package/dist/auth/users/delete.d.ts.map +1 -0
  549. package/dist/auth/users/email-move-guard.d.ts +20 -0
  550. package/dist/auth/users/email-move-guard.d.ts.map +1 -0
  551. package/dist/auth/users/email-prefix.d.ts +23 -0
  552. package/dist/auth/users/email-prefix.d.ts.map +1 -0
  553. package/dist/auth/users/fields-patch.d.ts +21 -0
  554. package/dist/auth/users/fields-patch.d.ts.map +1 -0
  555. package/dist/auth/users/find-by-email.d.ts +11 -0
  556. package/dist/auth/users/find-by-email.d.ts.map +1 -0
  557. package/dist/auth/users/find-many.d.ts +29 -0
  558. package/dist/auth/users/find-many.d.ts.map +1 -0
  559. package/dist/auth/users/find-or-create.d.ts +12 -0
  560. package/dist/auth/users/find-or-create.d.ts.map +1 -0
  561. package/dist/auth/users/flow-types.d.ts +15 -0
  562. package/dist/auth/users/flow-types.d.ts.map +1 -0
  563. package/dist/auth/users/index.d.ts +9 -0
  564. package/dist/auth/users/index.d.ts.map +1 -0
  565. package/dist/auth/users/insert.d.ts +15 -0
  566. package/dist/auth/users/insert.d.ts.map +1 -0
  567. package/dist/auth/users/name-prefix.d.ts +19 -0
  568. package/dist/auth/users/name-prefix.d.ts.map +1 -0
  569. package/dist/auth/users/password-flows.d.ts +11 -0
  570. package/dist/auth/users/password-flows.d.ts.map +1 -0
  571. package/dist/auth/users/record-flows.d.ts +11 -0
  572. package/dist/auth/users/record-flows.d.ts.map +1 -0
  573. package/dist/auth/users/sign-in.d.ts +24 -0
  574. package/dist/auth/users/sign-in.d.ts.map +1 -0
  575. package/dist/auth/users/sign-up.d.ts +13 -0
  576. package/dist/auth/users/sign-up.d.ts.map +1 -0
  577. package/dist/auth/users/type-api.d.ts +10 -0
  578. package/dist/auth/users/type-api.d.ts.map +1 -0
  579. package/dist/auth/users/update.d.ts +16 -0
  580. package/dist/auth/users/update.d.ts.map +1 -0
  581. package/dist/background/background.d.ts +22 -0
  582. package/dist/background/background.d.ts.map +1 -0
  583. package/dist/chunks/index-2ttdcz7n.js +354 -0
  584. package/dist/chunks/index-2ttdcz7n.js.map +16 -0
  585. package/dist/chunks/index-5dxynm32.js +85 -0
  586. package/dist/chunks/index-5dxynm32.js.map +10 -0
  587. package/dist/chunks/index-ftz0ne6j.js +127 -0
  588. package/dist/chunks/index-ftz0ne6j.js.map +11 -0
  589. package/dist/chunks/index-k6y18nx9.js +724 -0
  590. package/dist/chunks/index-k6y18nx9.js.map +24 -0
  591. package/dist/chunks/index-n8jxmxeg.js +64 -0
  592. package/dist/chunks/index-n8jxmxeg.js.map +11 -0
  593. package/dist/conformance/api-keys/cases/bound.d.ts +3 -0
  594. package/dist/conformance/api-keys/cases/bound.d.ts.map +1 -0
  595. package/dist/conformance/api-keys/cases/expiry.d.ts +3 -0
  596. package/dist/conformance/api-keys/cases/expiry.d.ts.map +1 -0
  597. package/dist/conformance/api-keys/cases/index.d.ts +4 -0
  598. package/dist/conformance/api-keys/cases/index.d.ts.map +1 -0
  599. package/dist/conformance/api-keys/cases/insert.d.ts +3 -0
  600. package/dist/conformance/api-keys/cases/insert.d.ts.map +1 -0
  601. package/dist/conformance/api-keys/cases/outage.d.ts +3 -0
  602. package/dist/conformance/api-keys/cases/outage.d.ts.map +1 -0
  603. package/dist/conformance/api-keys/cases/revoke.d.ts +3 -0
  604. package/dist/conformance/api-keys/cases/revoke.d.ts.map +1 -0
  605. package/dist/conformance/api-keys/cases/touch.d.ts +3 -0
  606. package/dist/conformance/api-keys/cases/touch.d.ts.map +1 -0
  607. package/dist/conformance/api-keys/cases/user-bound.d.ts +3 -0
  608. package/dist/conformance/api-keys/cases/user-bound.d.ts.map +1 -0
  609. package/dist/conformance/api-keys/describe.d.ts +20 -0
  610. package/dist/conformance/api-keys/describe.d.ts.map +1 -0
  611. package/dist/conformance/api-keys/fixtures.d.ts +4 -0
  612. package/dist/conformance/api-keys/fixtures.d.ts.map +1 -0
  613. package/dist/conformance/api-keys/index.d.ts +18 -0
  614. package/dist/conformance/api-keys/index.d.ts.map +1 -0
  615. package/dist/conformance/api-keys/reference.d.ts +4 -0
  616. package/dist/conformance/api-keys/reference.d.ts.map +1 -0
  617. package/dist/conformance/api-keys/types.d.ts +42 -0
  618. package/dist/conformance/api-keys/types.d.ts.map +1 -0
  619. package/dist/conformance/assert.d.ts +40 -0
  620. package/dist/conformance/assert.d.ts.map +1 -0
  621. package/dist/conformance/cases/outage.d.ts +3 -0
  622. package/dist/conformance/cases/outage.d.ts.map +1 -0
  623. package/dist/conformance/cases/outage.passkeys.d.ts +12 -0
  624. package/dist/conformance/cases/outage.passkeys.d.ts.map +1 -0
  625. package/dist/conformance/cases/passkeys/deletion.d.ts +4 -0
  626. package/dist/conformance/cases/passkeys/deletion.d.ts.map +1 -0
  627. package/dist/conformance/cases/passkeys/index.d.ts +8 -0
  628. package/dist/conformance/cases/passkeys/index.d.ts.map +1 -0
  629. package/dist/conformance/cases/passkeys/inserts.d.ts +4 -0
  630. package/dist/conformance/cases/passkeys/inserts.d.ts.map +1 -0
  631. package/dist/conformance/cases/passkeys/reads.d.ts +4 -0
  632. package/dist/conformance/cases/passkeys/reads.d.ts.map +1 -0
  633. package/dist/conformance/cases/passkeys/uses.d.ts +4 -0
  634. package/dist/conformance/cases/passkeys/uses.d.ts.map +1 -0
  635. package/dist/conformance/cases/sessions/deletion.d.ts +4 -0
  636. package/dist/conformance/cases/sessions/deletion.d.ts.map +1 -0
  637. package/dist/conformance/cases/sessions/extension.d.ts +4 -0
  638. package/dist/conformance/cases/sessions/extension.d.ts.map +1 -0
  639. package/dist/conformance/cases/sessions/index.d.ts +4 -0
  640. package/dist/conformance/cases/sessions/index.d.ts.map +1 -0
  641. package/dist/conformance/cases/sessions/inserts.d.ts +4 -0
  642. package/dist/conformance/cases/sessions/inserts.d.ts.map +1 -0
  643. package/dist/conformance/cases/sessions/list.d.ts +4 -0
  644. package/dist/conformance/cases/sessions/list.d.ts.map +1 -0
  645. package/dist/conformance/cases/sessions/reads.d.ts +4 -0
  646. package/dist/conformance/cases/sessions/reads.d.ts.map +1 -0
  647. package/dist/conformance/cases/sessions/reauthentication.d.ts +4 -0
  648. package/dist/conformance/cases/sessions/reauthentication.d.ts.map +1 -0
  649. package/dist/conformance/cases/sessions/revocation.d.ts +4 -0
  650. package/dist/conformance/cases/sessions/revocation.d.ts.map +1 -0
  651. package/dist/conformance/cases/social-links/deletion.d.ts +4 -0
  652. package/dist/conformance/cases/social-links/deletion.d.ts.map +1 -0
  653. package/dist/conformance/cases/social-links/index.d.ts +8 -0
  654. package/dist/conformance/cases/social-links/index.d.ts.map +1 -0
  655. package/dist/conformance/cases/social-links/inserts.d.ts +4 -0
  656. package/dist/conformance/cases/social-links/inserts.d.ts.map +1 -0
  657. package/dist/conformance/cases/social-links/reads.d.ts +4 -0
  658. package/dist/conformance/cases/social-links/reads.d.ts.map +1 -0
  659. package/dist/conformance/cases/tokens/attempts.d.ts +7 -0
  660. package/dist/conformance/cases/tokens/attempts.d.ts.map +1 -0
  661. package/dist/conformance/cases/tokens/change-email.d.ts +8 -0
  662. package/dist/conformance/cases/tokens/change-email.d.ts.map +1 -0
  663. package/dist/conformance/cases/tokens/deletion.d.ts +4 -0
  664. package/dist/conformance/cases/tokens/deletion.d.ts.map +1 -0
  665. package/dist/conformance/cases/tokens/index.d.ts +4 -0
  666. package/dist/conformance/cases/tokens/index.d.ts.map +1 -0
  667. package/dist/conformance/cases/tokens/inserts.d.ts +7 -0
  668. package/dist/conformance/cases/tokens/inserts.d.ts.map +1 -0
  669. package/dist/conformance/cases/tokens/kinds.d.ts +7 -0
  670. package/dist/conformance/cases/tokens/kinds.d.ts.map +1 -0
  671. package/dist/conformance/cases/tokens/redemption.d.ts +7 -0
  672. package/dist/conformance/cases/tokens/redemption.d.ts.map +1 -0
  673. package/dist/conformance/cases/tokens/social-flow.d.ts +8 -0
  674. package/dist/conformance/cases/tokens/social-flow.d.ts.map +1 -0
  675. package/dist/conformance/cases/tokens/spending.d.ts +7 -0
  676. package/dist/conformance/cases/tokens/spending.d.ts.map +1 -0
  677. package/dist/conformance/cases/users/avatar.d.ts +8 -0
  678. package/dist/conformance/cases/users/avatar.d.ts.map +1 -0
  679. package/dist/conformance/cases/users/batch.d.ts +8 -0
  680. package/dist/conformance/cases/users/batch.d.ts.map +1 -0
  681. package/dist/conformance/cases/users/deletion.d.ts +4 -0
  682. package/dist/conformance/cases/users/deletion.d.ts.map +1 -0
  683. package/dist/conformance/cases/users/index.d.ts +4 -0
  684. package/dist/conformance/cases/users/index.d.ts.map +1 -0
  685. package/dist/conformance/cases/users/inserts.d.ts +4 -0
  686. package/dist/conformance/cases/users/inserts.d.ts.map +1 -0
  687. package/dist/conformance/cases/users/listing.d.ts +4 -0
  688. package/dist/conformance/cases/users/listing.d.ts.map +1 -0
  689. package/dist/conformance/cases/users/patches.d.ts +7 -0
  690. package/dist/conformance/cases/users/patches.d.ts.map +1 -0
  691. package/dist/conformance/cases/users/reads.d.ts +7 -0
  692. package/dist/conformance/cases/users/reads.d.ts.map +1 -0
  693. package/dist/conformance/cases/users/second-factor.d.ts +16 -0
  694. package/dist/conformance/cases/users/second-factor.d.ts.map +1 -0
  695. package/dist/conformance/cases/users/versions.d.ts +7 -0
  696. package/dist/conformance/cases/users/versions.d.ts.map +1 -0
  697. package/dist/conformance/describe.d.ts +82 -0
  698. package/dist/conformance/describe.d.ts.map +1 -0
  699. package/dist/conformance/fixtures.d.ts +31 -0
  700. package/dist/conformance/fixtures.d.ts.map +1 -0
  701. package/dist/conformance/index.d.ts +46 -0
  702. package/dist/conformance/index.d.ts.map +1 -0
  703. package/dist/conformance/index.js +4411 -0
  704. package/dist/conformance/index.js.map +86 -0
  705. package/dist/conformance/invitations/cases/actors.d.ts +3 -0
  706. package/dist/conformance/invitations/cases/actors.d.ts.map +1 -0
  707. package/dist/conformance/invitations/cases/find-pending.d.ts +3 -0
  708. package/dist/conformance/invitations/cases/find-pending.d.ts.map +1 -0
  709. package/dist/conformance/invitations/cases/imported.d.ts +3 -0
  710. package/dist/conformance/invitations/cases/imported.d.ts.map +1 -0
  711. package/dist/conformance/invitations/cases/index.d.ts +4 -0
  712. package/dist/conformance/invitations/cases/index.d.ts.map +1 -0
  713. package/dist/conformance/invitations/cases/insert.d.ts +3 -0
  714. package/dist/conformance/invitations/cases/insert.d.ts.map +1 -0
  715. package/dist/conformance/invitations/cases/list-lapsed.d.ts +3 -0
  716. package/dist/conformance/invitations/cases/list-lapsed.d.ts.map +1 -0
  717. package/dist/conformance/invitations/cases/list-status.d.ts +3 -0
  718. package/dist/conformance/invitations/cases/list-status.d.ts.map +1 -0
  719. package/dist/conformance/invitations/cases/list.d.ts +3 -0
  720. package/dist/conformance/invitations/cases/list.d.ts.map +1 -0
  721. package/dist/conformance/invitations/cases/outage.d.ts +3 -0
  722. package/dist/conformance/invitations/cases/outage.d.ts.map +1 -0
  723. package/dist/conformance/invitations/cases/scope.d.ts +3 -0
  724. package/dist/conformance/invitations/cases/scope.d.ts.map +1 -0
  725. package/dist/conformance/invitations/cases/update.d.ts +3 -0
  726. package/dist/conformance/invitations/cases/update.d.ts.map +1 -0
  727. package/dist/conformance/invitations/describe.d.ts +20 -0
  728. package/dist/conformance/invitations/describe.d.ts.map +1 -0
  729. package/dist/conformance/invitations/fixtures.d.ts +4 -0
  730. package/dist/conformance/invitations/fixtures.d.ts.map +1 -0
  731. package/dist/conformance/invitations/index.d.ts +18 -0
  732. package/dist/conformance/invitations/index.d.ts.map +1 -0
  733. package/dist/conformance/invitations/reference.d.ts +4 -0
  734. package/dist/conformance/invitations/reference.d.ts.map +1 -0
  735. package/dist/conformance/invitations/types.d.ts +34 -0
  736. package/dist/conformance/invitations/types.d.ts.map +1 -0
  737. package/dist/conformance/reference.d.ts +13 -0
  738. package/dist/conformance/reference.d.ts.map +1 -0
  739. package/dist/conformance/relations/cases/deletion.d.ts +4 -0
  740. package/dist/conformance/relations/cases/deletion.d.ts.map +1 -0
  741. package/dist/conformance/relations/cases/holders.d.ts +9 -0
  742. package/dist/conformance/relations/cases/holders.d.ts.map +1 -0
  743. package/dist/conformance/relations/cases/index.d.ts +4 -0
  744. package/dist/conformance/relations/cases/index.d.ts.map +1 -0
  745. package/dist/conformance/relations/cases/outage.d.ts +3 -0
  746. package/dist/conformance/relations/cases/outage.d.ts.map +1 -0
  747. package/dist/conformance/relations/cases/reads.d.ts +8 -0
  748. package/dist/conformance/relations/cases/reads.d.ts.map +1 -0
  749. package/dist/conformance/relations/cases/traversal.d.ts +7 -0
  750. package/dist/conformance/relations/cases/traversal.d.ts.map +1 -0
  751. package/dist/conformance/relations/cases/writes.d.ts +4 -0
  752. package/dist/conformance/relations/cases/writes.d.ts.map +1 -0
  753. package/dist/conformance/relations/describe.d.ts +20 -0
  754. package/dist/conformance/relations/describe.d.ts.map +1 -0
  755. package/dist/conformance/relations/fixtures.d.ts +8 -0
  756. package/dist/conformance/relations/fixtures.d.ts.map +1 -0
  757. package/dist/conformance/relations/index.d.ts +18 -0
  758. package/dist/conformance/relations/index.d.ts.map +1 -0
  759. package/dist/conformance/relations/reference.d.ts +4 -0
  760. package/dist/conformance/relations/reference.d.ts.map +1 -0
  761. package/dist/conformance/relations/types.d.ts +34 -0
  762. package/dist/conformance/relations/types.d.ts.map +1 -0
  763. package/dist/conformance/types.d.ts +79 -0
  764. package/dist/conformance/types.d.ts.map +1 -0
  765. package/dist/errors/janus-error/base.d.ts +47 -0
  766. package/dist/errors/janus-error/base.d.ts.map +1 -0
  767. package/dist/errors/janus-error/codes.credentials.d.ts +36 -0
  768. package/dist/errors/janus-error/codes.credentials.d.ts.map +1 -0
  769. package/dist/errors/janus-error/codes.d.ts +23 -0
  770. package/dist/errors/janus-error/codes.d.ts.map +1 -0
  771. package/dist/errors/janus-error/codes.invitations.d.ts +52 -0
  772. package/dist/errors/janus-error/codes.invitations.d.ts.map +1 -0
  773. package/dist/errors/janus-error/codes.one-time.d.ts +63 -0
  774. package/dist/errors/janus-error/codes.one-time.d.ts.map +1 -0
  775. package/dist/errors/janus-error/codes.records.d.ts +86 -0
  776. package/dist/errors/janus-error/codes.records.d.ts.map +1 -0
  777. package/dist/errors/janus-error/codes.social.d.ts +88 -0
  778. package/dist/errors/janus-error/codes.social.d.ts.map +1 -0
  779. package/dist/errors/janus-error/index.d.ts +17 -0
  780. package/dist/errors/janus-error/index.d.ts.map +1 -0
  781. package/dist/errors/janus-error/options.d.ts +105 -0
  782. package/dist/errors/janus-error/options.d.ts.map +1 -0
  783. package/dist/errors/janus-error/refusals.d.ts +151 -0
  784. package/dist/errors/janus-error/refusals.d.ts.map +1 -0
  785. package/dist/errors/janus-error/status.d.ts +21 -0
  786. package/dist/errors/janus-error/status.d.ts.map +1 -0
  787. package/dist/errors/janus-error/store.d.ts +36 -0
  788. package/dist/errors/janus-error/store.d.ts.map +1 -0
  789. package/dist/ids/derived.d.ts +25 -0
  790. package/dist/ids/derived.d.ts.map +1 -0
  791. package/dist/ids/id.d.ts +55 -0
  792. package/dist/ids/id.d.ts.map +1 -0
  793. package/dist/index.d.ts +32 -0
  794. package/dist/index.d.ts.map +1 -0
  795. package/dist/index.js +6933 -0
  796. package/dist/index.js.map +208 -0
  797. package/dist/pagination/cursor-page.d.ts +53 -0
  798. package/dist/pagination/cursor-page.d.ts.map +1 -0
  799. package/dist/permissions/bound-model.d.ts +10 -0
  800. package/dist/permissions/bound-model.d.ts.map +1 -0
  801. package/dist/permissions/can.d.ts +13 -0
  802. package/dist/permissions/can.d.ts.map +1 -0
  803. package/dist/permissions/engine.d.ts +49 -0
  804. package/dist/permissions/engine.d.ts.map +1 -0
  805. package/dist/permissions/holders.d.ts +12 -0
  806. package/dist/permissions/holders.d.ts.map +1 -0
  807. package/dist/permissions/index.d.ts +36 -0
  808. package/dist/permissions/index.d.ts.map +1 -0
  809. package/dist/permissions/index.js +924 -0
  810. package/dist/permissions/index.js.map +28 -0
  811. package/dist/permissions/input.d.ts +43 -0
  812. package/dist/permissions/input.d.ts.map +1 -0
  813. package/dist/permissions/list.d.ts +16 -0
  814. package/dist/permissions/list.d.ts.map +1 -0
  815. package/dist/permissions/model/can.d.ts +41 -0
  816. package/dist/permissions/model/can.d.ts.map +1 -0
  817. package/dist/permissions/model/config.d.ts +36 -0
  818. package/dist/permissions/model/config.d.ts.map +1 -0
  819. package/dist/permissions/model/constraint.d.ts +37 -0
  820. package/dist/permissions/model/constraint.d.ts.map +1 -0
  821. package/dist/permissions/model/ctx.d.ts +23 -0
  822. package/dist/permissions/model/ctx.d.ts.map +1 -0
  823. package/dist/permissions/model/define.d.ts +78 -0
  824. package/dist/permissions/model/define.d.ts.map +1 -0
  825. package/dist/permissions/model/from-field.d.ts +31 -0
  826. package/dist/permissions/model/from-field.d.ts.map +1 -0
  827. package/dist/permissions/model/grant.d.ts +81 -0
  828. package/dist/permissions/model/grant.d.ts.map +1 -0
  829. package/dist/permissions/model/list.d.ts +48 -0
  830. package/dist/permissions/model/list.d.ts.map +1 -0
  831. package/dist/permissions/model/names.d.ts +51 -0
  832. package/dist/permissions/model/names.d.ts.map +1 -0
  833. package/dist/permissions/model/permissions.d.ts +48 -0
  834. package/dist/permissions/model/permissions.d.ts.map +1 -0
  835. package/dist/permissions/model/refs.d.ts +36 -0
  836. package/dist/permissions/model/refs.d.ts.map +1 -0
  837. package/dist/permissions/model/refusal.d.ts +13 -0
  838. package/dist/permissions/model/refusal.d.ts.map +1 -0
  839. package/dist/permissions/model/unions.d.ts +3 -0
  840. package/dist/permissions/model/unions.d.ts.map +1 -0
  841. package/dist/permissions/model/when.d.ts +16 -0
  842. package/dist/permissions/model/when.d.ts.map +1 -0
  843. package/dist/permissions/port/holders.d.ts +38 -0
  844. package/dist/permissions/port/holders.d.ts.map +1 -0
  845. package/dist/permissions/port/memory.d.ts +17 -0
  846. package/dist/permissions/port/memory.d.ts.map +1 -0
  847. package/dist/permissions/port/types.d.ts +101 -0
  848. package/dist/permissions/port/types.d.ts.map +1 -0
  849. package/dist/permissions/replace.d.ts +25 -0
  850. package/dist/permissions/replace.d.ts.map +1 -0
  851. package/dist/permissions/resolve/declared-names.d.ts +24 -0
  852. package/dist/permissions/resolve/declared-names.d.ts.map +1 -0
  853. package/dist/permissions/resolve/refuse-data-beyond-root.d.ts +11 -0
  854. package/dist/permissions/resolve/refuse-data-beyond-root.d.ts.map +1 -0
  855. package/dist/permissions/resolve/refuse-loops.d.ts +10 -0
  856. package/dist/permissions/resolve/refuse-loops.d.ts.map +1 -0
  857. package/dist/permissions/resolve/resolve-model.d.ts +13 -0
  858. package/dist/permissions/resolve/resolve-model.d.ts.map +1 -0
  859. package/dist/permissions/resolve/resolve-relation.d.ts +9 -0
  860. package/dist/permissions/resolve/resolve-relation.d.ts.map +1 -0
  861. package/dist/permissions/resolve/resolve-rule.d.ts +12 -0
  862. package/dist/permissions/resolve/resolve-rule.d.ts.map +1 -0
  863. package/dist/permissions/resolve/resolved.d.ts +52 -0
  864. package/dist/permissions/resolve/resolved.d.ts.map +1 -0
  865. package/dist/permissions/resolve/step.d.ts +4 -0
  866. package/dist/permissions/resolve/step.d.ts.map +1 -0
  867. package/dist/permissions/reverse.d.ts +53 -0
  868. package/dist/permissions/reverse.d.ts.map +1 -0
  869. package/dist/permissions/walk.d.ts +29 -0
  870. package/dist/permissions/walk.d.ts.map +1 -0
  871. package/dist/stores/guard.d.ts +24 -0
  872. package/dist/stores/guard.d.ts.map +1 -0
  873. package/dist/stores/storable.d.ts +15 -0
  874. package/dist/stores/storable.d.ts.map +1 -0
  875. package/dist/subjects/notation.d.ts +39 -0
  876. package/dist/subjects/notation.d.ts.map +1 -0
  877. package/dist/subjects/subject.d.ts +128 -0
  878. package/dist/subjects/subject.d.ts.map +1 -0
  879. package/dist/testing/index.d.ts +12 -0
  880. package/dist/testing/index.d.ts.map +1 -0
  881. package/dist/testing/index.js +26 -0
  882. package/dist/testing/index.js.map +10 -0
  883. package/dist/time/clock.d.ts +31 -0
  884. package/dist/time/clock.d.ts.map +1 -0
  885. package/dist/time/duration.d.ts +23 -0
  886. package/dist/time/duration.d.ts.map +1 -0
  887. package/docs/README.md +46 -0
  888. package/docs/guide/adapters.md +858 -0
  889. package/docs/guide/api-keys.md +316 -0
  890. package/docs/guide/avatars.md +334 -0
  891. package/docs/guide/devices.md +441 -0
  892. package/docs/guide/email-flows.md +880 -0
  893. package/docs/guide/errors.md +180 -0
  894. package/docs/guide/events.md +467 -0
  895. package/docs/guide/invitations.md +465 -0
  896. package/docs/guide/issuers.md +107 -0
  897. package/docs/guide/magic-link.md +580 -0
  898. package/docs/guide/migrating-invitations.md +142 -0
  899. package/docs/guide/passkeys.md +425 -0
  900. package/docs/guide/passwords.md +325 -0
  901. package/docs/guide/permissions.md +719 -0
  902. package/docs/guide/second-factor.md +1124 -0
  903. package/docs/guide/sessions.md +521 -0
  904. package/docs/guide/sign-in-code.md +631 -0
  905. package/docs/guide/social.md +639 -0
  906. package/docs/guide/step-up.md +262 -0
  907. package/docs/guide/users.md +557 -0
  908. package/docs/guide/vocabulary.md +316 -0
  909. package/docs/roadmap.md +101 -0
  910. package/docs/troubleshooting.md +3305 -0
  911. package/package.json +77 -5
@@ -0,0 +1,142 @@
1
+ # Migrating invitations
2
+
3
+ This page is for an application that already has invitations in another
4
+ system and wants them in Janus as history: who was invited, who joined, what
5
+ was revoked. It uses [`invitations.importHistory`](invitations.md#importing-history),
6
+ which copies records in without sending anything.
7
+
8
+ An imported record is **history, not a live invitation**. It has no code that
9
+ could ever match, so it cannot be previewed or accepted; it shows in `list`,
10
+ `get` and `count`. A live invitation that is still waiting is not imported: issue it
11
+ again with `issue`, which sends a new link.
12
+
13
+ ## Mapping the old fields
14
+
15
+ | Old field | `importHistory` field | Notes |
16
+ | --- | --- | --- |
17
+ | the old primary key | `key` | 1 to 100 characters, unique **within the scope**. Janus derives the id from the scope and the key. |
18
+ | organization | `scope` | Kept as given. |
19
+ | address | `email` | Normalised as `issue` does; one `@`. |
20
+ | invitee's name | `name` | 1 to 100 characters. |
21
+ | role | `role` | Opaque to Janus. |
22
+ | state | `status` | `accepted`, `revoked`, or `pending` (see below). |
23
+ | creation date | `createdAt` | A `Date`. It becomes the id's timestamp and orders the history. |
24
+ | accepted date | `acceptedAt` | Required when `accepted`. |
25
+ | user who accepted | `acceptedBy` | **A Janus user id**, or `null` when there is no such user. |
26
+ | revoked date | `revokedAt` | Required when `revoked`. |
27
+ | user who revoked | `revokedBy` | **A Janus user id**, or leave it out. |
28
+ | user who invited | `invitedBy` | **A Janus user id** or a user, or `null` for the system. |
29
+ | expiry date | `expiresAt` | Default: `createdAt` plus `invitations.lifetime`. |
30
+ | last change | `updatedAt` | Default: the accepted or revoked date, else `createdAt`. |
31
+ | language, reference | `locale`, `ref` | As for `issue`. |
32
+ | user type | `type` | One of `invitations.type`; required with several. |
33
+
34
+ **Three fields hold Janus user ids**, not your old ones: `acceptedBy`,
35
+ `revokedBy` and `invitedBy`. Import the users first, and map each old user id
36
+ to the Janus id, or pass `null` where the user is gone. An id that is not a
37
+ Janus id is refused as `invalid` on that field.
38
+
39
+ ### Statuses
40
+
41
+ - `accepted` and `revoked` are imported as they are.
42
+ - `pending` whose `expiresAt` has passed is imported **as pending, lapsed**.
43
+ It is listed as pending, as `list` shows every lapsed invitation. A later
44
+ `issue` to that address revokes it, as it revokes a native lapsed one.
45
+ - `pending` whose `expiresAt` is still ahead is refused (`live-pending`): the
46
+ person may still follow the link in their inbox, and the import gives them
47
+ none. Issue it again.
48
+ - A `pending` record is also refused (`pending-held`) when the scope and
49
+ address already hold a pending invitation, since there is one per pair.
50
+
51
+ ## Dry run first
52
+
53
+ ```ts
54
+ const records = old.map((row) => ({
55
+ key: row.id,
56
+ scope: row.organizationId,
57
+ email: row.email,
58
+ name: row.name,
59
+ role: row.role,
60
+ status: row.state,
61
+ createdAt: row.createdAt,
62
+ ...(row.state === 'accepted' && { acceptedAt: row.answeredAt, acceptedBy: userIds.get(row.userId) ?? null }),
63
+ ...(row.state === 'revoked' && { revokedAt: row.answeredAt }),
64
+ }));
65
+
66
+ for (let from = 0; from < records.length; from += 1000) {
67
+ const report = await auth.invitations.importHistory(records.slice(from, from + 1000), { dryRun: true });
68
+ for (const item of report.items) {
69
+ if (item.outcome === 'refused') console.warn(item.key, item.reason, item.field);
70
+ }
71
+ }
72
+ ```
73
+
74
+ A call takes **at most 1000 records**: cut a bigger import into calls. With
75
+ `dryRun: true` nothing is written; the report says what would happen
76
+ (`inserted` means "would be inserted"). Fix the refusals in your data, run it
77
+ again, and when it is clean run the same loop without `dryRun`.
78
+
79
+ The report has one item per record, in order: `{ key, id, outcome, reason?, field? }`
80
+ with the totals `inserted`, `present` and `refused`. A reason names a shape
81
+ (`field: 'acceptedAt'`), never the value you passed. A call that is not an array
82
+ of at most 1000 records, or has bad options, throws a `TypeError`; a store
83
+ outage throws a `StoreFailure`, and what was written before it stays.
84
+
85
+ ## Re-running
86
+
87
+ The import is **idempotent by (`scope`, `key`)**: the id is derived from both,
88
+ so running it again reports the records already there as `present` and writes
89
+ nothing. That makes an interrupted import safe to repeat, and lets you import
90
+ the rows that changed in the old system, one `key` at a time. A record that is
91
+ `present` is **never updated**: its second import does not carry a changed
92
+ status. Two runs at the same time may both report `inserted` for a record; one
93
+ write wins and the other finds it taken.
94
+
95
+ Two records with one scope and key in one call: the second is refused
96
+ (`duplicate-key`). The same scope and key already imported with another
97
+ `createdAt` is refused as `key-taken`; its `id` is the one in the store.
98
+
99
+ ## What keeps the history
100
+
101
+ Imported records are old, so their `expiresAt` is long past. A store that
102
+ deletes expired invitations deletes them too.
103
+
104
+ - **MongoDB** (`@softistx/janus-mongo`): the `invitations` TTL index drops
105
+ every invitation 30 days after `expiresAt`. Imported records are older than
106
+ that, so **the next TTL pass, within a minute, drops them**. **Run the sync
107
+ first**, before the import, so that no pass sees the records:
108
+
109
+ ```ts
110
+ await syncMongoInvitations(db, { expiry: { keepAccepted: true, keepRevoked: true, keepLapsed: true } });
111
+ ```
112
+
113
+ `keepAccepted` keeps accepted records, `keepRevoked` revoked ones and
114
+ `keepLapsed` lapsed pending ones; an import sets all three. The index sees only the stored status, so a native
115
+ pending invitation that lapsed is kept too. See
116
+ [the sync page](https://github.com/softistx/nxgt-janus/blob/develop/packages/janus-mongo/docs/guide/sync.md#keeping-history).
117
+ - **Drizzle** (`@softistx/janus-drizzle`): nothing expires on its own, but
118
+ `deleteExpiredInvitations(before)` deletes **every status** whose `expiresAt`
119
+ is at or before `before`. Do not schedule it on a table holding history, or
120
+ call it with a `before` earlier than the oldest imported `expiresAt`, or
121
+ delete lapsed pending rows yourself with a statement that keeps the
122
+ `accepted` and `revoked` ones.
123
+ - **Your own store**: if it expires records by `expiresAt`, keep the imported
124
+ ones out of it, or keep the statuses you want as history.
125
+
126
+ ## Traps
127
+
128
+ - **Nothing is sent and nothing is emitted.** No mail, no code, no
129
+ `invitation.*` event: a webhook or audit listener does not see the import.
130
+ - **Accepted records do not create users or memberships.** `acceptedBy` only
131
+ names a user; adding the member to the organization is yours.
132
+ - **`present` is not "unchanged".** A record already imported is left as it
133
+ was, even when the old row differs now.
134
+ - **The key is the identity.** Changing how you build `key` imports every
135
+ record a second time under new ids. And a record imported once with another
136
+ `createdAt` (the id carries it) is refused as `key-taken`, never imported
137
+ twice: keep `createdAt` stable, or change the key.
138
+
139
+ ## See also
140
+
141
+ - [Invitations](invitations.md) — issuing, resending, revoking and accepting
142
+ - [Adapters](adapters.md) — what an invitation store must keep
@@ -0,0 +1,425 @@
1
+ # Passkeys: second factor, or first
2
+
3
+ A passkey is a WebAuthn credential kept by the user's device, password manager
4
+ or security key. In Janus it is a **second factor beside TOTP, never instead
5
+ of it**: a user may register a passkey only while their TOTP is active.
6
+ Optionally (`firstFactor: true`, which needs no `secondFactor` at all) it is the **first factor** too, for a
7
+ passwordless sign-in: see [below](#passkey-as-the-first-factor). Registering and managing passkeys, then answering a sign-in's second factor
8
+ and a step-up with one, are on this page.
9
+
10
+ Install the verifier beside the core, from npmjs: `bun add @softistx/janus-passkeys`
11
+ (see the [core's install section](../../README.md#install)).
12
+
13
+ The core does no WebAuthn. It makes and spends the challenge, checks the user
14
+ and the session, and stores the credential; a `PasskeyVerifier` reads the
15
+ browser's JSON. `@softistx/janus-passkeys` is one, on `@simplewebauthn/server`;
16
+ the port is documented in the [README](../../README.md#api).
17
+
18
+ ## Wiring
19
+
20
+ ```ts
21
+ import { simpleWebAuthnVerifier } from '@softistx/janus-passkeys';
22
+
23
+ const auth = janus({
24
+ user,
25
+ password: { login: 'email' },
26
+ store, // needs the passkeys slot: createMemoryStores(), or an adapter's
27
+ hasher,
28
+ secondFactor: { issuer: 'Clinic', keys }, // optional with firstFactor: true
29
+ passkeys: {
30
+ rpId: 'example.com',
31
+ rpName: 'Clinic',
32
+ origins: ['https://app.example.com'],
33
+ verifier: simpleWebAuthnVerifier(),
34
+ },
35
+ });
36
+ ```
37
+
38
+ | Option | Default | |
39
+ | --- | --- | --- |
40
+ | `rpId` | required | The domain credentials are scoped to: a lowercase host (`example.com`), no scheme, port or path. Changing it strands every registered passkey |
41
+ | `rpName` | required | The name the browser shows when it asks |
42
+ | `origins` | required, at least one | The origins a response may come from. Each is `https` (or `http://localhost`, `http://<name>.localhost` such as `http://tenant.app.localhost`, or `http://127.0.0.1`, on any port, for development; no other `http` host) and on `rpId`: the same host or a subdomain |
43
+ | `relatedOrigins` | none | Origins on **another host** than `rpId` (a second domain), accepted beside `origins` by registration and sign-in. Each is `https` (or the same local dev hosts as `origins`), with no path, on any host. See [Related origins](#related-origins) |
44
+ | `verifier` | required | A `PasskeyVerifier` |
45
+ | `userVerification` | `'preferred'` | `'required'` asks the authenticator to verify the user (PIN, biometrics) and the core refuses any response, at registration, sign-in or step-up, whose verifier reports `userVerified: false`; at sign-in and step-up the refusal counts as a wrong code (a spent attempt); `'discouraged'` does not |
46
+ | `freshWithin` | `'10m'` | How recently the session must have proved who it is to `register` or `remove` |
47
+ | `firstFactor` | `false` | `true` makes a passkey a first factor: [sign in with one alone](#passkey-as-the-first-factor). `secondFactor` is then optional: configure it only for a TOTP |
48
+ | `maxPerUser` | `10` | The passkeys one user may hold: a positive integer. `register` refuses the next with `PASSKEY_LIMIT` (409, `maxActive` carries the cap) |
49
+
50
+ ### Related origins
51
+
52
+ A passkey is scoped to `rpId`, and `origins` only takes `rpId` or its
53
+ subdomains. To accept ceremonies from a page on **another domain** (a
54
+ customer's own domain, a second brand), list it in `relatedOrigins`
55
+ (WebAuthn Level 3 related origin requests):
56
+
57
+ ```ts
58
+ passkeys: {
59
+ rpId: 'example.com',
60
+ rpName: 'Clinic',
61
+ origins: ['https://app.example.com'],
62
+ relatedOrigins: ['https://portal.customer.org'], // any host, https, no path
63
+ verifier: simpleWebAuthnVerifier(),
64
+ },
65
+ ```
66
+
67
+ The entries skip the on-`rpId` check, are validated as well-formed secure
68
+ origins (a path or a non-`https` origin is refused at wiring), and are added to
69
+ the origins the verifier accepts for registration and sign-in. `origins` keeps
70
+ its strict rule.
71
+
72
+ **Your application must also serve `/.well-known/webauthn`** on the `rpId` host
73
+ (`https://example.com/.well-known/webauthn`), a JSON document listing the same
74
+ origins: `{ "origins": ["https://portal.customer.org"] }`. The browser reads it
75
+ before it lets the other domain use `rpId`; janus does not serve it. Browsers
76
+ cap the number of distinct registrable domains in that document (five labels in
77
+ current implementations).
78
+
79
+ `tokens: { passkeyRegistration }` is how long a registration's challenge waits
80
+ (`'5m'` by default).
81
+
82
+ **The types refuse the configuration** without `secondFactor` (unless `firstFactor: true`) and over a store
83
+ whose type has no `passkeys` slot, on the `passkeys` key. A store typed as
84
+ `JanusStores`, where the slot is optional, passes the types and is refused at
85
+ wiring with a `TypeError` naming the slot; so is every option the types cannot
86
+ see (an `rpId` with a scheme, an origin off `rpId`, a verifier missing a method).
87
+
88
+ The calls below exist on a user type's API (`auth.passkeys` with one type,
89
+ `auth.staff.passkeys` with several).
90
+
91
+ ## Registering
92
+
93
+ Registration is two calls: the options the browser needs, then what it answered.
94
+
95
+ ```ts
96
+ // 1. The user asks to add a passkey.
97
+ const { options, challenge, expiresAt } = await auth.passkeys.registrationOptions(user);
98
+ // Send `options` to the page: navigator.credentials.create({ publicKey: options }).
99
+ // Keep `challenge` with the user (page state, a short-lived cookie).
100
+
101
+ // 2. The page sends the credential back.
102
+ const current = await auth.authenticate(request);
103
+ const passkey = await auth.passkeys.register(current, {
104
+ challenge,
105
+ response, // what navigator.credentials.create() resolved to, as JSON, as received
106
+ name: 'Laptop', // the user's, 1 to 100 characters once trimmed
107
+ });
108
+ ```
109
+
110
+ `registrationOptions` refuses a user whose TOTP is not active with
111
+ `SECOND_FACTOR_NOT_ENROLLED` (only with `firstFactor` off), and an inactive one with `USER_INACTIVE`. It
112
+ makes a challenge (32 random bytes, base64url), stores only its hash for
113
+ `tokens.passkeyRegistration`, and asks the verifier for the options with the
114
+ user's existing credentials excluded, so one authenticator is not registered
115
+ twice. The user handle is derived from the user's id, never the e-mail.
116
+
117
+ `register` takes the session (`Authenticated`, from `authenticate`), because
118
+ it is **fresh**: a session that proved who it is more than `freshWithin` ago
119
+ is `STEP_UP_REQUIRED`, and the usual [step-up](step-up.md) fixes it. Then, in this order:
120
+
121
+ 1. the name is checked (`PASSKEY_INVALID`, `field: 'name'`) — **nothing is
122
+ spent** for a bad name;
123
+ 2. the user's passkeys are counted: at `maxPerUser`, `PASSKEY_LIMIT`, **nothing
124
+ spent**;
125
+ 3. the challenge is spent, once: unknown, used and lapsed are
126
+ `TOKEN_UNKNOWN`, `TOKEN_SPENT` and `TOKEN_EXPIRED`; another user's challenge is
127
+ unknown — **and spent**: the token is consumed before its owner is compared,
128
+ so a challenge presented by the wrong user is burnt (fail closed), never
129
+ left usable;
130
+ 4. the user must still have an active TOTP;
131
+ 5. the verifier checks the response. One that does not verify is
132
+ `PASSKEY_INVALID` with `reason`, **and the challenge stays spent** — ask for
133
+ new options. An unexpected failure of the verifier propagates as thrown;
134
+ 6. the passkey is inserted. A credential already registered, by this user or
135
+ another, is `PASSKEY_TAKEN`; nothing is written over it;
136
+ 7. the TOTP is checked again: if a `secondFactor.disable` landed meanwhile,
137
+ the passkey just inserted is deleted and the call is
138
+ `SECOND_FACTOR_NOT_ENROLLED`, with no event. If an `update` moved the
139
+ e-mail meanwhile, the passkey is deleted and the call is `EMAIL_UNVERIFIED`,
140
+ with no event. So is a passkey whose user's e-mail or verification date is
141
+ no longer what the call checked at its start (the e-mail was moved and
142
+ proved again between the check and the insert, so the first proof's wipe
143
+ ran before the insert). That fails closed: a `changeEmail.confirm`, or a
144
+ `verifyEmail` re-proof of the same address, landing in that instant
145
+ withdraws a legitimate passkey too, and the user registers again. The
146
+ count is read again too:
147
+ two registrations racing at `maxPerUser - 1` can both see the user over the
148
+ cap, and then **both** withdraw with `PASSKEY_LIMIT` (fail closed; the
149
+ user registers again);
150
+ 8. `user.passkeyAdded` is emitted, carrying `passkey: { credentialId, name }`.
151
+
152
+ ## Listing, renaming and removing
153
+
154
+ ```ts
155
+ const passkeys = await auth.passkeys.list(user); // oldest first; [] for none
156
+ await auth.passkeys.rename(user, credentialId, 'Work laptop'); // true | false
157
+ await auth.passkeys.remove(current, credentialId); // true | false
158
+ ```
159
+
160
+ A `Passkey` carries `credentialId`, `userId`, `name`, `transports`, `aaguid`,
161
+ `backupEligible`, `backedUp`, `createdAt` and `lastUsedAt`. **It never carries the public key or the counter.**
162
+ `rename` and `remove` answer `false` for a passkey that is not the user's or not there, and
163
+ change nothing — a request-supplied credential id tells nothing about whose it is.
164
+ `remove` is fresh, like `register`, and emits `user.passkeyRemoved` when it
165
+ deleted one. Deleting a user deletes their passkeys, and so does
166
+ **disabling their TOTP**: a passkey only stands beside an active TOTP, so
167
+ `secondFactor.disable` (and a first proof that removes an active TOTP) deletes
168
+ them all and emits one `user.passkeyRemoved` for each passkey it deleted. A
169
+ final sweep deletes whatever a registration inserted in the meantime, with no
170
+ event.
171
+
172
+ ## Signing in with a passkey
173
+
174
+ `signIn` (and every first proof that ends at a second factor: a sign-in code, a
175
+ link, `signInProven`, social) answers `SecondFactorRequired`. It now says what
176
+ can answer it:
177
+
178
+ ```ts
179
+ const result = await auth.signIn({ email, password });
180
+ if (result.status === 'secondFactor') {
181
+ result.challenge; // keep it with the visitor, as before
182
+ result.methods; // ['totp'] | ['totp', 'passkey']
183
+ result.passkeyOptions; // present exactly when methods has 'passkey'
184
+ }
185
+ ```
186
+
187
+ `methods` is always there and always has `'totp'`; `'passkey'` and
188
+ `passkeyOptions` appear when `janus()` was given `passkeys` and the user holds
189
+ at least one. Existing callers that ignore them keep working. The page hands
190
+ `passkeyOptions` to `navigator.credentials.get({ publicKey })` and sends the
191
+ result back:
192
+
193
+ ```ts
194
+ const signedIn = await auth.secondFactor.confirmPasskey(challenge, assertion, { device });
195
+ ```
196
+
197
+ - **The WebAuthn challenge is derived, not stored**: an HMAC (SHA-256, base64url)
198
+ of the sign-in token's secret, with a key derived from the sealing keys for
199
+ this purpose alone. A step-up derives with another purpose, so an assertion
200
+ made for one never answers the other. Rotating the sealing keys between
201
+ `signIn` and the assertion refuses that one assertion.
202
+ - **The attempts are the challenge's five**, shared with `confirm` and
203
+ `recover`: a TOTP guess and a passkey assertion draw on the same count.
204
+ Anything the visitor can cause — a response that does not verify, a credential
205
+ that is unknown or another user's, a counter regression, a malformed body — is
206
+ `CODE_INVALID` with `attemptsLeft`; the fifth spends the challenge. An
207
+ unknown, spent or lapsed challenge is `TOKEN_UNKNOWN`, `TOKEN_SPENT`,
208
+ `TOKEN_EXPIRED`; a user whose TOTP was disabled meanwhile is
209
+ `SECOND_FACTOR_NOT_ENROLLED`.
210
+ - **The session** opens as after `confirm`: the sign-in count restarts, and a
211
+ `device` given again handles `newDevice` and `user.newDeviceSignedIn`.
212
+ The user record is not written (a passkey leaves the TOTP's `lastStep` alone).
213
+ - **The counter** follows one rule. A stored counter of `0`, or a received `0`,
214
+ is always accepted (an authenticator without a counter; a received `0` after
215
+ a counted history never lowers the stored one). A counter that did not move
216
+ forward (`new <= stored`, both non-zero) is refused as above **and** emits
217
+ `user.passkeyCloneSuspected` with `passkey: { credentialId, name }`; the
218
+ passkey stays active, so a user is not locked out by a false alarm. The
219
+ event fires **once per refused assertion**, with no deduplication: debounce
220
+ it in your listener before notifying the user. Your
221
+ listener decides: a notice, an alert, `passkeys.remove`. A verifier that
222
+ reports `counterRegression` itself is treated the same way.
223
+ - **On success** the passkey's `counter`, `backedUp` and `lastUsedAt` are
224
+ written, conditionally on the counter read: of two assertions on one counter,
225
+ only one passes.
226
+
227
+ ## Passkey as the first factor
228
+
229
+ With `passkeys: { ..., firstFactor: true }` a
230
+ passkey signs the user in alone. What changes:
231
+
232
+ - `secondFactor` becomes optional. Its sealing keys seal the TOTP secret and
233
+ its recovery codes, so an application with passkeys only configures neither:
234
+ `janus({ …, passkeys: { …, firstFactor: true } })`. The `auth.passkeys` API
235
+ is then on the type as well. Add `secondFactor` later to offer a TOTP too.
236
+ - `registrationOptions` and `register` no longer need an active TOTP, and ask a
237
+ **discoverable** credential (`residentKey` and `userVerification` required)
238
+ through the verifier's optional `discoverable` input; `@softistx/janus-passkeys`
239
+ supports it, a verifier written before it registers credentials that cannot sign in.
240
+ - `update` refuses to move the e-mail of a user who holds a passkey
241
+ (`EMAIL_CHANGE_NEEDS_PROOF`, nothing written): the new address would be
242
+ unproved and its first proof would remove every passkey. Use `changeEmail`,
243
+ which proves the new address.
244
+ - Disabling a TOTP keeps the passkeys (and the sweep on activation is skipped).
245
+ `proveFirstEmail` still removes all of them.
246
+ - **A type with an e-mail registers a passkey only once the e-mail is
247
+ verified** (`EMAIL_UNVERIFIED` otherwise), beside a TOTP or as a first
248
+ factor. The first proof of the e-mail removes every passkey, so one
249
+ registered before it would vanish unannounced; and a passkey that signs in
250
+ alone must never belong to somebody who squatted an address: a password reset
251
+ or an e-mail proof by the real owner would not remove it. A reset replaces the
252
+ password and revokes the sessions; it leaves the owner's own passkeys, so
253
+ remove them (`passkeys.remove`) when an account is recovered after a
254
+ compromise.
255
+ - Turning `firstFactor` on later makes the passkeys registered beside a TOTP
256
+ first factors too, but only those the authenticator made discoverable (they
257
+ were registered with `residentKey: 'preferred'`); the others must be
258
+ registered again. An unverified address still loses passkeys stored before registration required a verified e-mail, at its first proof.
259
+ - The assertion must carry the **user handle** (the discoverable credential's
260
+ `userHandle`); a missing or different one is refused.
261
+ - `signInOptions` and `signIn` are on the type only when `firstFactor: true` is
262
+ written as a literal in the config; with a `boolean` variable they are absent
263
+ from the type and refuse at run time.
264
+ - With a literal `firstFactor: true`, the whole `auth.passkeys` surface
265
+ (registration, list, rename, remove, sign-in) is typed whatever the type's
266
+ login, including a passwordless type with no password.
267
+
268
+ ```ts
269
+ // Anonymous: nothing says who the visitor is yet.
270
+ const { options, challenge, expiresAt } = await auth.passkeys.signInOptions();
271
+ // options -> navigator.credentials.get({ publicKey }); keep `challenge` with the visitor.
272
+
273
+ const { user, session, token } = await auth.passkeys.signIn(challenge, response, { device });
274
+ ```
275
+
276
+ ```ts
277
+ interface PasskeySignInChallenge {
278
+ options: Record<string, unknown>; // for navigator.credentials.get
279
+ challenge: string; // base64url, single use
280
+ expiresAt: Date;
281
+ }
282
+ signInOptions(): Promise<PasskeySignInChallenge>;
283
+ signIn(challenge: string, response: unknown, options?: SignInOptions): Promise<SignedIn<User>>;
284
+ ```
285
+
286
+ `signIn` answers like a password sign-in (`session.authenticatedAt` is now, the
287
+ new-device report runs) and asks no TOTP code. It requires user verification.
288
+ The challenge reuses the `tokens.passkeyRegistration` lifetime and is spent on
289
+ the first try: a failed attempt needs a new `signInOptions`.
290
+
291
+ | Throws | When |
292
+ | --- | --- |
293
+ | `CredentialError` `CREDENTIALS_INVALID`, `reason: 'passkey'` | The assertion was refused: unknown credential, malformed response, a user handle that does not match, or a verification failure (origin, `rpId`, challenge, user not verified). One answer, so the response tells nothing |
294
+ | `TokenError` `TOKEN_UNKNOWN`, `TOKEN_SPENT`, `TOKEN_EXPIRED` | The challenge is missing, unknown, spent, lapsed, or a registration's |
295
+ | `UserError` `USER_INACTIVE`, `EMAIL_UNVERIFIED` | The user is inactive, or has an unverified e-mail when `requireVerifiedEmail` is set; checked only once the assertion verified |
296
+ | `UserError` `EMAIL_UNVERIFIED` | `registrationOptions` or `register` while the account's e-mail is not proved, whatever `requireVerifiedEmail` says: verify the e-mail first |
297
+ | `TypeError` naming `passkeys.firstFactor` | Called with `firstFactor` off; nothing is spent |
298
+
299
+ A counter regression is refused the same way and emits
300
+ `user.passkeyCloneSuspected`.
301
+
302
+ A Hono route:
303
+
304
+ ```ts
305
+ import { CredentialError, TokenError } from '@softistx/janus';
306
+
307
+ app.get('/passkey/sign-in', async (c) => c.json(await auth.passkeys.signInOptions()));
308
+ app.post('/passkey/sign-in', async (c) => {
309
+ const { challenge, response } = await c.req.json();
310
+ try {
311
+ const { token } = await auth.passkeys.signIn(challenge, response);
312
+ return c.json({ token });
313
+ } catch (error) {
314
+ if (error instanceof CredentialError || error instanceof TokenError) return c.json({ error: 'invalid' }, 401);
315
+ throw error;
316
+ }
317
+ });
318
+ ```
319
+
320
+ `signInOptions` is anonymous and stores a token per call: rate-limit it where requests enter.
321
+
322
+ ## Counter policy
323
+
324
+ A stored or received counter of `0` is always accepted. Otherwise a counter that
325
+ did not move forward is refused and emits `user.passkeyCloneSuspected`; the
326
+ passkey stays active, and the stored counter is never lowered (it is the
327
+ maximum seen). Details in [signing in](#signing-in-with-a-passkey); see also the
328
+ [Traps](#traps).
329
+
330
+ ## Stepping up with a passkey
331
+
332
+ ```ts
333
+ const issued = await auth.stepUp.request(user, { via: 'passkey' });
334
+ // { via: 'passkey', challenge, options, expiresAt, user } — nothing is sent
335
+ // `options` → navigator.credentials.get({ publicKey }); keep `challenge`
336
+ const session = await auth.stepUp.confirmPasskey(request, issued.challenge, assertion);
337
+ ```
338
+
339
+ It mirrors the other kinds: one live step-up per user, a session that is not
340
+ the challenge's user's is `TOKEN_UNKNOWN`, and the session presented is
341
+ stamped (`authenticatedAt` moves). Its token is marked as a passkey's: a code
342
+ sent to `stepUp.confirm` for it, or an assertion sent to `confirmPasskey` for an
343
+ app's or e-mailed challenge, is `TOKEN_UNKNOWN`. `stepUp.request(user)` without `via` is
344
+ unchanged — the app's code for a user with a second factor, an e-mailed code
345
+ otherwise. A user with no passkey is refused with `SECOND_FACTOR_NOT_ENROLLED`.
346
+ The challenge's five attempts and the counter rule are the sign-in's; the
347
+ per-user window the app's codes share is not applied to assertions, which
348
+ cannot be guessed. Like every step-up it exists on types with an e-mail.
349
+
350
+ Types: the request answers `StepUpByPasskey`; `stepUp.request(user, { via })`
351
+ and `stepUp.confirmPasskey` are the `StepUpPasskeyApi` addition, and
352
+ `secondFactor.confirmPasskey` is `PasskeySignInApi`'s; `methods` is a list of
353
+ `SecondFactorMethod` (`'totp' | 'passkey'`). They exist only when `janus()` is given
354
+ `passkeys`; without the block they are absent from the type, and a JavaScript
355
+ caller gets a `TypeError` naming `passkeys` before any attempt is counted.
356
+
357
+ ## The store slot
358
+
359
+ Passkeys live in an optional fifth store slot, `passkeys`. Bring one:
360
+
361
+ | You use | The slot comes from |
362
+ | --- | --- |
363
+ | `createMemoryStores()` | Already there, for specs and local runs |
364
+ | `@softistx/janus-mongo` | `createMongoStores(db)` (typed with `passkeys` present, so it needs no cast); run `syncMongoAdapter(db)` first so the `passkeys` collection and its unique `credentialId` index exist |
365
+ | `@softistx/janus-drizzle` | Add `passkeys` to `defineJanusTables()` and migrate ([to 0.16](https://github.com/softistx/nxgt-janus/blob/develop/packages/janus-drizzle/docs/guide/migrations.md#to-016-passkeys-and-the-passkeyregistration-kind)) |
366
+ | `@softistx/janus-kit` | Wires whichever adapter you chose; it refuses to start on MongoDB until the collection exists |
367
+
368
+ An adapter of your own implements the slot and runs the `passkeys` group of
369
+ `describeJanusStores` from `@softistx/janus/conformance`.
370
+
371
+ ## Mails and events
372
+
373
+ `janus()` sends nothing. It emits `user.passkeyAdded` and `user.passkeyRemoved`
374
+ (each with `passkey: { credentialId, name }`) and `user.passkeyCloneSuspected`.
375
+ [`@softistx/janus-mail`](https://github.com/softistx/nxgt-janus/blob/develop/packages/janus-mail/docs/guide/sending.md#passkeyaddedto-added-and-passkeyremovedto-removed)
376
+ has `passkeyAdded` and `passkeyRemoved` notices for the first two; the clone
377
+ alarm has no mail, so route it in your listener. Removing a user's TOTP emits
378
+ one `passkeyRemoved` per passkey, so debounce on `event.userId` if you mail.
379
+
380
+ ## Over HTTP and GraphQL
381
+
382
+ - [`passkeyRoutes(auth)`](https://github.com/softistx/nxgt-janus/blob/develop/packages/janus-hono/docs/guide/routes.md#passkeys) of `@softistx/janus-hono`: the routes for all of the above.
383
+ - [`passkeyResolvers`](https://github.com/softistx/nxgt-janus/blob/develop/packages/janus-graphql/docs/guide/passkeys.md) of `@softistx/janus-graphql`: the SDL and resolvers.
384
+
385
+ ## Testing with a fake verifier
386
+
387
+ The core never depends on the WebAuthn library, so a spec needs no browser:
388
+
389
+ ```ts
390
+ const verifier: PasskeyVerifier = {
391
+ async registrationOptions(input) { return { challenge: input.challenge }; },
392
+ async verifyRegistration({ response, expectedChallenge }) {
393
+ const { challenge, credentialId } = response as { challenge: string; credentialId: string };
394
+ if (challenge !== expectedChallenge) return { ok: false, reason: 'challenge' };
395
+ return { ok: true, credentialId, publicKey: 'key', counter: 0, transports: ['internal'], aaguid: '', backupEligible: true, backedUp: false };
396
+ },
397
+ async authenticationOptions({ challenge }) { return { challenge }; },
398
+ async verifyAuthentication({ response, expectedChallenge, credential }) {
399
+ const { id, challenge, counter } = response as { id: string; challenge: string; counter: number };
400
+ if (id !== credential.credentialId || challenge !== expectedChallenge) return { ok: false, reason: 'challenge' };
401
+ return { ok: true, credentialId: id, counter, backedUp: false, userVerified: true };
402
+ },
403
+ };
404
+
405
+ const { challenge } = await auth.passkeys.registrationOptions(user);
406
+ await auth.passkeys.register(current, { challenge, response: { challenge, credentialId: 'c1' }, name: 'Test' });
407
+
408
+ // Sign-in: answer with the challenge of passkeyOptions.
409
+ const result = await auth.signIn({ email, password });
410
+ if (result.status === 'secondFactor' && result.passkeyOptions) {
411
+ const assertion = { id: 'c1', challenge: String(result.passkeyOptions.challenge), counter: 1 };
412
+ await auth.secondFactor.confirmPasskey(result.challenge, assertion);
413
+ }
414
+ ```
415
+
416
+ ## Traps
417
+
418
+ - **Disabling TOTP removes every passkey, unless `firstFactor` is on** (then they stay: they still sign the user in). A first proof of an e-mail (`proveFirstEmail`) removes all of them either way. Warn the user before they do.
419
+ - **Credential ids are scoped per store**: each `janus()` instance or partition has its own, so a passkey of one is unknown to another.
420
+ - **One attempt per registration challenge.** A response that does not verify spends it. A sign-in or
421
+ step-up challenge takes five, shared with the app's codes.
422
+ - **A counter regression refuses, it does not disable.** Handle `user.passkeyCloneSuspected`.
423
+ - **`rpId` is forever.** Credentials are scoped to it by the browser.
424
+
425
+ Related: [the second factor](second-factor.md), [step-up](step-up.md), [user events](events.md), [errors](errors.md).