@oxyhq/services 22.12.5 → 22.13.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 (464) hide show
  1. package/README.md +16 -46
  2. package/lib/commonjs/index.js +90 -10
  3. package/lib/commonjs/index.js.map +1 -1
  4. package/lib/commonjs/notifications/deviceNotifications.js +424 -0
  5. package/lib/commonjs/notifications/deviceNotifications.js.map +1 -0
  6. package/lib/commonjs/ui/boot/runProviderColdBoot.js +51 -9
  7. package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
  8. package/lib/commonjs/ui/client.js +0 -13
  9. package/lib/commonjs/ui/client.js.map +1 -1
  10. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +27 -4
  11. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
  12. package/lib/commonjs/ui/components/OxyAuthChooser.js +74 -1124
  13. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  14. package/lib/commonjs/ui/components/OxyConsentScreen.js +50 -12
  15. package/lib/commonjs/ui/components/OxyConsentScreen.js.map +1 -1
  16. package/lib/commonjs/ui/components/OxyProvider.js +4 -4
  17. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  18. package/lib/commonjs/ui/components/OxySignInButton.js +74 -40
  19. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  20. package/lib/commonjs/ui/components/OxySignInRequestSurface.js +147 -0
  21. package/lib/commonjs/ui/components/OxySignInRequestSurface.js.map +1 -0
  22. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +527 -0
  23. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -0
  24. package/lib/commonjs/ui/components/authChooser/SignInEntryView.js +90 -0
  25. package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +1 -0
  26. package/lib/commonjs/ui/components/authChooser/SignInRequestView.js +106 -0
  27. package/lib/commonjs/ui/components/authChooser/SignInRequestView.js.map +1 -0
  28. package/lib/commonjs/ui/components/authChooser/SignUpView.js +188 -0
  29. package/lib/commonjs/ui/components/authChooser/SignUpView.js.map +1 -0
  30. package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js +61 -0
  31. package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js.map +1 -0
  32. package/lib/commonjs/ui/components/authChooser/primitives.js +169 -0
  33. package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -0
  34. package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +153 -0
  35. package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -0
  36. package/lib/commonjs/ui/components/authChooser/signInProgress.js +54 -0
  37. package/lib/commonjs/ui/components/authChooser/signInProgress.js.map +1 -0
  38. package/lib/commonjs/ui/components/{oxyAuthChooserStyles.js → authChooser/styles.js} +19 -1
  39. package/lib/commonjs/ui/components/authChooser/styles.js.map +1 -0
  40. package/lib/commonjs/ui/components/authChooser/types.js +70 -0
  41. package/lib/commonjs/ui/components/authChooser/types.js.map +1 -0
  42. package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js +50 -0
  43. package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js.map +1 -0
  44. package/lib/commonjs/ui/context/OxyContext.js +205 -30
  45. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  46. package/lib/commonjs/ui/context/commitSessionFlow.js +46 -0
  47. package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
  48. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +15 -2
  49. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  50. package/lib/commonjs/ui/context/useOxyAccountGraph.js +13 -5
  51. package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
  52. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +6 -1
  53. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js.map +1 -1
  54. package/lib/commonjs/ui/index.js +0 -13
  55. package/lib/commonjs/ui/index.js.map +1 -1
  56. package/lib/commonjs/ui/oauth/browserAuthTransport.js +170 -0
  57. package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -0
  58. package/lib/commonjs/ui/oauth/completeOAuthCode.js +78 -0
  59. package/lib/commonjs/ui/oauth/completeOAuthCode.js.map +1 -0
  60. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +48 -0
  61. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +1 -0
  62. package/lib/commonjs/ui/oauth/oauthHandshake.js +53 -0
  63. package/lib/commonjs/ui/oauth/oauthHandshake.js.map +1 -0
  64. package/lib/commonjs/ui/oauth/oauthPopup.js +276 -0
  65. package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -0
  66. package/lib/commonjs/ui/oauth/oauthPopupMessages.js +141 -0
  67. package/lib/commonjs/ui/oauth/oauthPopupMessages.js.map +1 -0
  68. package/lib/commonjs/ui/oauth/types.js +2 -0
  69. package/lib/commonjs/ui/oauth/types.js.map +1 -0
  70. package/lib/commonjs/ui/server.js +2 -5
  71. package/lib/commonjs/ui/server.js.map +1 -1
  72. package/lib/commonjs/ui/session/authStore.js +6 -75
  73. package/lib/commonjs/ui/session/authStore.js.map +1 -1
  74. package/lib/commonjs/ui/session/createSessionClient.js +11 -3
  75. package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
  76. package/lib/commonjs/ui/session/identityBinding.js +95 -0
  77. package/lib/commonjs/ui/session/identityBinding.js.map +1 -0
  78. package/lib/commonjs/ui/session/index.js +13 -0
  79. package/lib/commonjs/ui/session/index.js.map +1 -1
  80. package/lib/commonjs/ui/session/nativeSecureStorage.js +90 -0
  81. package/lib/commonjs/ui/session/nativeSecureStorage.js.map +1 -0
  82. package/lib/commonjs/ui/session/tokenTransport.js +11 -1
  83. package/lib/commonjs/ui/session/tokenTransport.js.map +1 -1
  84. package/lib/commonjs/ui/utils/crossOriginRestore.js +3 -2
  85. package/lib/commonjs/ui/utils/crossOriginRestore.js.map +1 -1
  86. package/lib/commonjs/ui/utils/deliveryPlatform.js +58 -0
  87. package/lib/commonjs/ui/utils/deliveryPlatform.js.map +1 -0
  88. package/lib/commonjs/ui/utils/oauthReturn.js +33 -49
  89. package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
  90. package/lib/module/index.js +27 -4
  91. package/lib/module/index.js.map +1 -1
  92. package/lib/module/notifications/deviceNotifications.js +414 -0
  93. package/lib/module/notifications/deviceNotifications.js.map +1 -0
  94. package/lib/module/ui/boot/runProviderColdBoot.js +51 -9
  95. package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
  96. package/lib/module/ui/client.js +0 -1
  97. package/lib/module/ui/client.js.map +1 -1
  98. package/lib/module/ui/components/OxyAccountDialogScreen.js +27 -4
  99. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
  100. package/lib/module/ui/components/OxyAuthChooser.js +78 -1129
  101. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  102. package/lib/module/ui/components/OxyConsentScreen.js +50 -12
  103. package/lib/module/ui/components/OxyConsentScreen.js.map +1 -1
  104. package/lib/module/ui/components/OxyProvider.js +4 -4
  105. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  106. package/lib/module/ui/components/OxySignInButton.js +76 -42
  107. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  108. package/lib/module/ui/components/OxySignInRequestSurface.js +141 -0
  109. package/lib/module/ui/components/OxySignInRequestSurface.js.map +1 -0
  110. package/lib/module/ui/components/authChooser/AccountsMenuView.js +523 -0
  111. package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -0
  112. package/lib/module/ui/components/authChooser/SignInEntryView.js +85 -0
  113. package/lib/module/ui/components/authChooser/SignInEntryView.js.map +1 -0
  114. package/lib/module/ui/components/authChooser/SignInRequestView.js +101 -0
  115. package/lib/module/ui/components/authChooser/SignInRequestView.js.map +1 -0
  116. package/lib/module/ui/components/authChooser/SignUpView.js +184 -0
  117. package/lib/module/ui/components/authChooser/SignUpView.js.map +1 -0
  118. package/lib/module/ui/components/authChooser/TroubleDisclosure.js +57 -0
  119. package/lib/module/ui/components/authChooser/TroubleDisclosure.js.map +1 -0
  120. package/lib/module/ui/components/authChooser/primitives.js +163 -0
  121. package/lib/module/ui/components/authChooser/primitives.js.map +1 -0
  122. package/lib/module/ui/components/authChooser/requestSurfaces.js +143 -0
  123. package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -0
  124. package/lib/module/ui/components/authChooser/signInProgress.js +50 -0
  125. package/lib/module/ui/components/authChooser/signInProgress.js.map +1 -0
  126. package/lib/module/ui/components/{oxyAuthChooserStyles.js → authChooser/styles.js} +19 -1
  127. package/lib/module/ui/components/authChooser/styles.js.map +1 -0
  128. package/lib/module/ui/components/authChooser/types.js +66 -0
  129. package/lib/module/ui/components/authChooser/types.js.map +1 -0
  130. package/lib/module/ui/components/authChooser/useUsernameAvailability.js +46 -0
  131. package/lib/module/ui/components/authChooser/useUsernameAvailability.js.map +1 -0
  132. package/lib/module/ui/context/OxyContext.js +208 -33
  133. package/lib/module/ui/context/OxyContext.js.map +1 -1
  134. package/lib/module/ui/context/commitSessionFlow.js +45 -0
  135. package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
  136. package/lib/module/ui/context/hooks/useAuthOperations.js +15 -2
  137. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  138. package/lib/module/ui/context/useOxyAccountGraph.js +13 -5
  139. package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
  140. package/lib/module/ui/hooks/useSwitchableAccounts.js +6 -1
  141. package/lib/module/ui/hooks/useSwitchableAccounts.js.map +1 -1
  142. package/lib/module/ui/index.js +0 -1
  143. package/lib/module/ui/index.js.map +1 -1
  144. package/lib/module/ui/oauth/browserAuthTransport.js +167 -0
  145. package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -0
  146. package/lib/module/ui/oauth/completeOAuthCode.js +75 -0
  147. package/lib/module/ui/oauth/completeOAuthCode.js.map +1 -0
  148. package/lib/module/ui/oauth/legacyRedirectLanes.js +44 -0
  149. package/lib/module/ui/oauth/legacyRedirectLanes.js.map +1 -0
  150. package/lib/module/ui/oauth/oauthHandshake.js +50 -0
  151. package/lib/module/ui/oauth/oauthHandshake.js.map +1 -0
  152. package/lib/module/ui/oauth/oauthPopup.js +268 -0
  153. package/lib/module/ui/oauth/oauthPopup.js.map +1 -0
  154. package/lib/module/ui/oauth/oauthPopupMessages.js +135 -0
  155. package/lib/module/ui/oauth/oauthPopupMessages.js.map +1 -0
  156. package/lib/module/ui/oauth/types.js +2 -0
  157. package/lib/module/ui/oauth/types.js.map +1 -0
  158. package/lib/module/ui/server.js +0 -2
  159. package/lib/module/ui/server.js.map +1 -1
  160. package/lib/module/ui/session/authStore.js +5 -75
  161. package/lib/module/ui/session/authStore.js.map +1 -1
  162. package/lib/module/ui/session/createSessionClient.js +11 -3
  163. package/lib/module/ui/session/createSessionClient.js.map +1 -1
  164. package/lib/module/ui/session/identityBinding.js +89 -0
  165. package/lib/module/ui/session/identityBinding.js.map +1 -0
  166. package/lib/module/ui/session/index.js +5 -2
  167. package/lib/module/ui/session/index.js.map +1 -1
  168. package/lib/module/ui/session/nativeSecureStorage.js +88 -0
  169. package/lib/module/ui/session/nativeSecureStorage.js.map +1 -0
  170. package/lib/module/ui/session/tokenTransport.js +11 -1
  171. package/lib/module/ui/session/tokenTransport.js.map +1 -1
  172. package/lib/module/ui/utils/crossOriginRestore.js +4 -3
  173. package/lib/module/ui/utils/crossOriginRestore.js.map +1 -1
  174. package/lib/module/ui/utils/deliveryPlatform.js +55 -0
  175. package/lib/module/ui/utils/deliveryPlatform.js.map +1 -0
  176. package/lib/module/ui/utils/oauthReturn.js +35 -50
  177. package/lib/module/ui/utils/oauthReturn.js.map +1 -1
  178. package/lib/typescript/commonjs/index.d.ts +9 -1
  179. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  180. package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +173 -0
  181. package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +34 -2
  183. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  184. package/lib/typescript/commonjs/ui/client.d.ts +0 -1
  185. package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
  186. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  187. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +23 -29
  188. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  189. package/lib/typescript/commonjs/ui/components/OxyConsentScreen.d.ts.map +1 -1
  190. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  191. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts +17 -12
  192. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts +108 -0
  194. package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts +38 -0
  196. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts +32 -0
  198. package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts +34 -0
  200. package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts +34 -0
  202. package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts +36 -0
  204. package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +55 -0
  206. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -0
  207. package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +58 -0
  208. package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts.map +1 -0
  209. package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts +26 -0
  210. package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts.map +1 -0
  211. package/lib/typescript/{module/ui/components/oxyAuthChooserStyles.d.ts → commonjs/ui/components/authChooser/styles.d.ts} +19 -1
  212. package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts.map +1 -0
  213. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +103 -0
  214. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -0
  215. package/lib/typescript/commonjs/ui/components/authChooser/useUsernameAvailability.d.ts +16 -0
  216. package/lib/typescript/commonjs/ui/components/authChooser/useUsernameAvailability.d.ts.map +1 -0
  217. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  218. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +40 -0
  219. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
  220. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +11 -2
  221. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  222. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +44 -1
  223. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
  224. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +7 -1
  225. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  226. package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
  227. package/lib/typescript/commonjs/ui/index.d.ts +0 -1
  228. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  229. package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts +56 -0
  230. package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/ui/oauth/completeOAuthCode.d.ts +49 -0
  232. package/lib/typescript/commonjs/ui/oauth/completeOAuthCode.d.ts.map +1 -0
  233. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +40 -0
  234. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts +50 -0
  236. package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts.map +1 -0
  237. package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +83 -0
  238. package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/ui/oauth/oauthPopupMessages.d.ts +67 -0
  240. package/lib/typescript/commonjs/ui/oauth/oauthPopupMessages.d.ts.map +1 -0
  241. package/lib/typescript/commonjs/ui/oauth/types.d.ts +176 -0
  242. package/lib/typescript/commonjs/ui/oauth/types.d.ts.map +1 -0
  243. package/lib/typescript/commonjs/ui/server.d.ts +0 -2
  244. package/lib/typescript/commonjs/ui/server.d.ts.map +1 -1
  245. package/lib/typescript/commonjs/ui/session/authStore.d.ts +3 -7
  246. package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +8 -1
  248. package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/ui/session/identityBinding.d.ts +66 -0
  250. package/lib/typescript/commonjs/ui/session/identityBinding.d.ts.map +1 -0
  251. package/lib/typescript/commonjs/ui/session/index.d.ts +6 -2
  252. package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts +25 -0
  254. package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts.map +1 -0
  255. package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts +8 -1
  256. package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts.map +1 -1
  257. package/lib/typescript/commonjs/ui/types/navigation.d.ts +44 -0
  258. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/ui/utils/deliveryPlatform.d.ts +33 -0
  261. package/lib/typescript/commonjs/ui/utils/deliveryPlatform.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +11 -16
  263. package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
  264. package/lib/typescript/module/index.d.ts +9 -1
  265. package/lib/typescript/module/index.d.ts.map +1 -1
  266. package/lib/typescript/module/notifications/deviceNotifications.d.ts +173 -0
  267. package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -0
  268. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +34 -2
  269. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  270. package/lib/typescript/module/ui/client.d.ts +0 -1
  271. package/lib/typescript/module/ui/client.d.ts.map +1 -1
  272. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  273. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +23 -29
  274. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  275. package/lib/typescript/module/ui/components/OxyConsentScreen.d.ts.map +1 -1
  276. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  277. package/lib/typescript/module/ui/components/OxySignInButton.d.ts +17 -12
  278. package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
  279. package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts +108 -0
  280. package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
  281. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts +38 -0
  282. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -0
  283. package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts +32 -0
  284. package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +1 -0
  285. package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts +34 -0
  286. package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts.map +1 -0
  287. package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts +34 -0
  288. package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts.map +1 -0
  289. package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts +36 -0
  290. package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -0
  291. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +55 -0
  292. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -0
  293. package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +58 -0
  294. package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts.map +1 -0
  295. package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts +26 -0
  296. package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts.map +1 -0
  297. package/lib/typescript/{commonjs/ui/components/oxyAuthChooserStyles.d.ts → module/ui/components/authChooser/styles.d.ts} +19 -1
  298. package/lib/typescript/module/ui/components/authChooser/styles.d.ts.map +1 -0
  299. package/lib/typescript/module/ui/components/authChooser/types.d.ts +103 -0
  300. package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -0
  301. package/lib/typescript/module/ui/components/authChooser/useUsernameAvailability.d.ts +16 -0
  302. package/lib/typescript/module/ui/components/authChooser/useUsernameAvailability.d.ts.map +1 -0
  303. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  304. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +40 -0
  305. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
  306. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +11 -2
  307. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  308. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +44 -1
  309. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
  310. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +7 -1
  311. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  312. package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
  313. package/lib/typescript/module/ui/index.d.ts +0 -1
  314. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  315. package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts +56 -0
  316. package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -0
  317. package/lib/typescript/module/ui/oauth/completeOAuthCode.d.ts +49 -0
  318. package/lib/typescript/module/ui/oauth/completeOAuthCode.d.ts.map +1 -0
  319. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +40 -0
  320. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
  321. package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts +50 -0
  322. package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts.map +1 -0
  323. package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +83 -0
  324. package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -0
  325. package/lib/typescript/module/ui/oauth/oauthPopupMessages.d.ts +67 -0
  326. package/lib/typescript/module/ui/oauth/oauthPopupMessages.d.ts.map +1 -0
  327. package/lib/typescript/module/ui/oauth/types.d.ts +176 -0
  328. package/lib/typescript/module/ui/oauth/types.d.ts.map +1 -0
  329. package/lib/typescript/module/ui/server.d.ts +0 -2
  330. package/lib/typescript/module/ui/server.d.ts.map +1 -1
  331. package/lib/typescript/module/ui/session/authStore.d.ts +3 -7
  332. package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -1
  333. package/lib/typescript/module/ui/session/createSessionClient.d.ts +8 -1
  334. package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
  335. package/lib/typescript/module/ui/session/identityBinding.d.ts +66 -0
  336. package/lib/typescript/module/ui/session/identityBinding.d.ts.map +1 -0
  337. package/lib/typescript/module/ui/session/index.d.ts +6 -2
  338. package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
  339. package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts +25 -0
  340. package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts.map +1 -0
  341. package/lib/typescript/module/ui/session/tokenTransport.d.ts +8 -1
  342. package/lib/typescript/module/ui/session/tokenTransport.d.ts.map +1 -1
  343. package/lib/typescript/module/ui/types/navigation.d.ts +44 -0
  344. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  345. package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +1 -1
  346. package/lib/typescript/module/ui/utils/deliveryPlatform.d.ts +33 -0
  347. package/lib/typescript/module/ui/utils/deliveryPlatform.d.ts.map +1 -0
  348. package/lib/typescript/module/ui/utils/oauthReturn.d.ts +11 -16
  349. package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
  350. package/package.json +18 -10
  351. package/src/index.ts +51 -5
  352. package/src/notifications/deviceNotifications.ts +458 -0
  353. package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +281 -0
  354. package/src/ui/boot/runProviderColdBoot.ts +83 -13
  355. package/src/ui/client.ts +0 -1
  356. package/src/ui/components/OxyAccountDialogScreen.tsx +33 -4
  357. package/src/ui/components/OxyAuthChooser.tsx +102 -1231
  358. package/src/ui/components/OxyConsentScreen.tsx +56 -13
  359. package/src/ui/components/OxyProvider.tsx +4 -4
  360. package/src/ui/components/OxySignInButton.tsx +119 -78
  361. package/src/ui/components/OxySignInRequestSurface.tsx +202 -0
  362. package/src/ui/components/__tests__/OxyConsentScreen.test.tsx +27 -0
  363. package/src/ui/components/authChooser/AccountsMenuView.tsx +569 -0
  364. package/src/ui/components/authChooser/SignInEntryView.tsx +121 -0
  365. package/src/ui/components/authChooser/SignInRequestView.tsx +130 -0
  366. package/src/ui/components/authChooser/SignUpView.tsx +174 -0
  367. package/src/ui/components/authChooser/TroubleDisclosure.tsx +73 -0
  368. package/src/ui/components/authChooser/primitives.tsx +144 -0
  369. package/src/ui/components/authChooser/requestSurfaces.tsx +120 -0
  370. package/src/ui/components/authChooser/signInProgress.ts +54 -0
  371. package/src/ui/components/{oxyAuthChooserStyles.ts → authChooser/styles.ts} +18 -0
  372. package/src/ui/components/authChooser/types.ts +120 -0
  373. package/src/ui/components/authChooser/useUsernameAvailability.ts +60 -0
  374. package/src/ui/context/OxyContext.tsx +226 -24
  375. package/src/ui/context/__tests__/commitSessionFlow.test.ts +102 -0
  376. package/src/ui/context/commitSessionFlow.ts +64 -0
  377. package/src/ui/context/hooks/useAuthOperations.ts +26 -1
  378. package/src/ui/context/oxyContextTypes.ts +45 -1
  379. package/src/ui/context/useOxyAccountGraph.ts +19 -5
  380. package/src/ui/hooks/useSwitchableAccounts.ts +12 -1
  381. package/src/ui/index.ts +0 -1
  382. package/src/ui/oauth/__tests__/browserAuthTransport.test.ts +335 -0
  383. package/src/ui/oauth/__tests__/completeOAuthCode.test.ts +142 -0
  384. package/src/ui/oauth/__tests__/oauthPopup.test.ts +352 -0
  385. package/src/ui/oauth/__tests__/oauthPopupMessages.test.ts +189 -0
  386. package/src/ui/oauth/__tests__/sharedCompletionPath.test.ts +174 -0
  387. package/src/ui/oauth/browserAuthTransport.ts +193 -0
  388. package/src/ui/oauth/completeOAuthCode.ts +93 -0
  389. package/src/ui/oauth/legacyRedirectLanes.ts +43 -0
  390. package/src/ui/oauth/oauthHandshake.ts +74 -0
  391. package/src/ui/oauth/oauthPopup.ts +277 -0
  392. package/src/ui/oauth/oauthPopupMessages.ts +136 -0
  393. package/src/ui/oauth/types.ts +150 -0
  394. package/src/ui/server.ts +0 -2
  395. package/src/ui/session/__tests__/createSessionClient.test.ts +26 -0
  396. package/src/ui/session/__tests__/tokenTransport.test.ts +34 -0
  397. package/src/ui/session/authStore.ts +5 -89
  398. package/src/ui/session/createSessionClient.ts +15 -2
  399. package/src/ui/session/identityBinding.ts +116 -0
  400. package/src/ui/session/index.ts +6 -2
  401. package/src/ui/session/nativeSecureStorage.ts +98 -0
  402. package/src/ui/session/tokenTransport.ts +14 -1
  403. package/src/ui/types/navigation.ts +44 -1
  404. package/src/ui/utils/__tests__/crossOriginRestore.test.ts +17 -0
  405. package/src/ui/utils/crossOriginRestore.ts +7 -6
  406. package/src/ui/utils/deliveryPlatform.ts +65 -0
  407. package/src/ui/utils/oauthReturn.ts +38 -62
  408. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  409. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  410. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  411. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  412. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  413. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  414. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  415. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  416. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  417. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  418. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  419. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  420. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  421. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  422. package/lib/commonjs/ui/components/FontLoader.js +0 -35
  423. package/lib/commonjs/ui/components/FontLoader.js.map +0 -1
  424. package/lib/commonjs/ui/components/FontLoader.native.js +0 -88
  425. package/lib/commonjs/ui/components/FontLoader.native.js.map +0 -1
  426. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +0 -1
  427. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  428. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  429. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  430. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  431. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  432. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  433. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  434. package/lib/module/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  435. package/lib/module/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  436. package/lib/module/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  437. package/lib/module/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  438. package/lib/module/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  439. package/lib/module/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  440. package/lib/module/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  441. package/lib/module/ui/components/FontLoader.js +0 -29
  442. package/lib/module/ui/components/FontLoader.js.map +0 -1
  443. package/lib/module/ui/components/FontLoader.native.js +0 -83
  444. package/lib/module/ui/components/FontLoader.native.js.map +0 -1
  445. package/lib/module/ui/components/oxyAuthChooserStyles.js.map +0 -1
  446. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +0 -24
  447. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +0 -1
  448. package/lib/typescript/commonjs/ui/components/FontLoader.native.d.ts +0 -13
  449. package/lib/typescript/commonjs/ui/components/FontLoader.native.d.ts.map +0 -1
  450. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +0 -1
  451. package/lib/typescript/module/ui/components/FontLoader.d.ts +0 -24
  452. package/lib/typescript/module/ui/components/FontLoader.d.ts.map +0 -1
  453. package/lib/typescript/module/ui/components/FontLoader.native.d.ts +0 -13
  454. package/lib/typescript/module/ui/components/FontLoader.native.d.ts.map +0 -1
  455. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +0 -1
  456. package/src/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  457. package/src/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  458. package/src/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  459. package/src/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  460. package/src/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  461. package/src/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  462. package/src/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  463. package/src/ui/components/FontLoader.native.tsx +0 -88
  464. package/src/ui/components/FontLoader.tsx +0 -27
@@ -4,12 +4,16 @@
4
4
  * `@oxyhq/core` owns the platform-agnostic `SessionClient`, its host adapter,
5
5
  * and the pure `DeviceSessionState → services` projection helpers; those are
6
6
  * re-exported straight from core here so `OxyContext` has one import site.
7
- * `@oxyhq/services` supplies only the two platform pieces: the thin
7
+ * `@oxyhq/services` supplies only the platform pieces: the thin
8
8
  * `createSessionClient` factory (injects socket.io-client `io` + the
9
- * device-first token transport) and the `AuthStateStore` factory.
9
+ * device-first token transport), the `AuthStateStore` factory, and — for
10
+ * `sessionMode: 'identity'` — the identity binding (platform pin store + the
11
+ * memoised pinned account id).
10
12
  */
11
13
  export { createSessionClient } from './createSessionClient.js';
12
14
  export { createTokenTransport } from './tokenTransport.js';
13
15
  export { createPlatformAuthStateStore } from './authStore.js';
16
+ export { createIdentitySessionBinding, IdentityBoundSessionError } from './identityBinding.js';
17
+ export type { IdentitySessionBinding } from './identityBinding.js';
14
18
  export { createSessionClientHost, accountIdsOf, activeSessionIdOf, activeUserOf, deviceStateToClientSessions, } from '@oxyhq/core';
15
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAkB,CAAC;AACxD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAa,CAAC;AAC3D,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,2BAA2B,GAC5B,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAkB,CAAC;AACxD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAa,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,sBAAmB,CAAC;AAC5F,YAAY,EAAE,sBAAsB,EAAE,MAAM,sBAAmB,CAAC;AAChE,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,2BAA2B,GAC5B,MAAM,aAAa,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The native secure key/value seam every durable `@oxyhq/core` store in this
3
+ * package is built on.
4
+ *
5
+ * `@oxyhq/core` owns the store LOGIC (`createNativeAuthStateStore` for the
6
+ * zero-cookie device credential, `createNativeIdentityPinStore` for the identity
7
+ * pin) and takes its persistence as an injected `NativeKeyValueStorage`. This
8
+ * module supplies that injection ONCE, so those stores can never drift onto
9
+ * different backings — a device credential in SecureStore and a pin in
10
+ * AsyncStorage would resolve differently after a keystore reset.
11
+ *
12
+ * `expo-secure-store` is loaded via a runtime-computed dynamic import (the same
13
+ * optional-native-module pattern `OxyProvider` uses for netinfo / keyboard
14
+ * controller), so the web bundle never pulls it and a device without it falls
15
+ * back to AsyncStorage rather than crashing.
16
+ */
17
+ import type { NativeKeyValueStorage } from '@oxyhq/core';
18
+ /**
19
+ * A native `NativeKeyValueStorage` that prefers `expo-secure-store` (encrypted
20
+ * at rest) and falls back to AsyncStorage when SecureStore is not installed.
21
+ * The SecureStore module is resolved lazily on first access so construction
22
+ * stays synchronous.
23
+ */
24
+ export declare function createNativeSecureKeyValueStorage(): NativeKeyValueStorage;
25
+ //# sourceMappingURL=nativeSecureStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeSecureStorage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/nativeSecureStorage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AA0CzD;;;;;GAKG;AACH,wBAAgB,iCAAiC,IAAI,qBAAqB,CAiCzE"}
@@ -21,6 +21,13 @@ import { type OxyServices, type TokenTransport } from '@oxyhq/core';
21
21
  *
22
22
  * A failure is logged and swallowed: this method must never throw out (it runs
23
23
  * inside the socket state handler).
24
+ *
25
+ * `getPinnedAccountId` is the identity-bound escape hatch. Converging the bearer
26
+ * on `state.activeAccountId` is precisely what an identity-bound client must
27
+ * never do — its token is minted for the PINNED account by the cold boot /
28
+ * re-mint lane. `SessionClient` already bypasses the transport entirely while
29
+ * pinned; this guard is the services-side half of that contract, so no future
30
+ * wiring can reintroduce the convergence from this end.
24
31
  */
25
- export declare function createTokenTransport(oxyServices: OxyServices): TokenTransport;
32
+ export declare function createTokenTransport(oxyServices: OxyServices, getPinnedAccountId?: () => string | null): TokenTransport;
26
33
  //# sourceMappingURL=tokenTransport.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tokenTransport.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/tokenTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAG5E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,cAAc,CA8B7E"}
1
+ {"version":3,"file":"tokenTransport.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/tokenTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAG5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,kBAAkB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GACvC,cAAc,CAiChB"}
@@ -1,6 +1,8 @@
1
1
  import type { ReactNode, RefObject } from 'react';
2
2
  import type { QueryClient } from '@tanstack/react-query';
3
3
  import type { RouteName } from '../navigation/routes.js';
4
+ import type { SessionMode } from '@oxyhq/core';
5
+ import type { WebAuthMode } from '../oauth/types.js';
4
6
  export interface StepController {
5
7
  canGoBack: () => boolean;
6
8
  goBack: () => void;
@@ -59,6 +61,48 @@ export interface OxyProviderProps {
59
61
  * so a local/staging deployment targets its own IdP instead of production.
60
62
  */
61
63
  authorizeBaseUrl?: string;
64
+ /**
65
+ * Who owns this app's session.
66
+ *
67
+ * - `'account'` (default) — the device's ACTIVE account. Every ordinary Oxy
68
+ * app: any app sharing the device's `DeviceSession` can switch the active
69
+ * account and this one follows, sign-in surfaces and the account switcher
70
+ * are available, and `accounts` lists the account graph.
71
+ * - `'identity'` — the owner of this device's PRIMARY identity key, for as
72
+ * long as that key exists. The provider pins its authenticated user AND
73
+ * its bearer to the account that key authenticates as, so an account
74
+ * switch made by any sibling app changes the shared device state but never
75
+ * this app's user or token. Built for the identity vault (Commons).
76
+ *
77
+ * In `'identity'` mode the account-graph surfaces are disabled at the source
78
+ * rather than hidden in the UI: `accounts` stays empty and is never fetched,
79
+ * `switchToAccount` / `switchSession` reject with `IdentityBoundSessionError`,
80
+ * `accountDialogController` is `null` and `openAccountDialog()` does nothing,
81
+ * and the two web OAuth cold-boot lanes (authorization-code return + silent
82
+ * cross-origin restore) are skipped — all of them commit whichever account
83
+ * the IdP resolves, which is not necessarily the local key's owner.
84
+ *
85
+ * Read once at mount, like `baseURL` / `oxyServices`: changing it on a
86
+ * mounted provider does not re-bind the session.
87
+ * @default 'account'
88
+ */
89
+ sessionMode?: SessionMode;
90
+ /**
91
+ * How a WEB third-party "Sign in with Oxy" hands the user to the IdP.
92
+ *
93
+ * - `'redirect'` (default) — a full-page navigation to `auth.oxy.so`, which
94
+ * returns to the registered `redirect_uri` with `?code=`. The tab unmounts
95
+ * and remounts, so route and unsaved state are lost.
96
+ * - `'popup'` — a small `auth.oxy.so` window opened from the user's click.
97
+ * The app stays MOUNTED and becomes authenticated without a reload; the
98
+ * IdP delivers only the authorization code + `state` back to the opener
99
+ * via `postMessage` (never a token, device secret, or PKCE verifier). A
100
+ * blocked popup falls back to the redirect automatically.
101
+ *
102
+ * Native is unaffected — it always uses an in-app auth session.
103
+ * @default 'redirect'
104
+ */
105
+ webAuthMode?: WebAuthMode;
62
106
  queryClient?: QueryClient;
63
107
  /** Sync device credentials to auth.oxy.so after interactive sign-in. @default true */
64
108
  hubSync?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/types/navigation.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MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAiDlB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,gBAAgB,GAAG,kBAAkB,GAAG,IAAI,CAyBtF"}
1
+ {"version":3,"file":"crossOriginRestore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/crossOriginRestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAuB/C,8EAA8E;AAC9E,wBAAgB,2BAA2B,IAAI,OAAO,CAOrD;AAED,iFAAiF;AACjF,wBAAgB,+BAA+B,IAAI,IAAI,CAKtD;AAED,qEAAqE;AACrE,wBAAgB,6BAA6B,IAAI,IAAI,CAMpD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAIrE;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAgDlB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,gBAAgB,GAAG,kBAAkB,GAAG,IAAI,CA0BtF"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Classify the surface a "Sign in with Oxy" request is initiated from, for
3
+ * `AccountDialogController`'s `platform` option (issue #691, Phase 4/5).
4
+ *
5
+ * `@oxyhq/core` deliberately refuses to do this itself — it never touches a
6
+ * platform global — so the consumer that OWNS the environment classifies it and
7
+ * hands the verdict in. The verdict feeds `selectCommonsDelivery`, where it
8
+ * decides one thing only: whether this device may take the `'open-commons'`
9
+ * deep-link route. Getting it wrong in the "mobile" direction is the costly
10
+ * error (a custom-scheme navigation that does not resolve is a dead end with no
11
+ * automatic way back), so every ambiguous signal resolves AWAY from `'mobile'`.
12
+ *
13
+ * No user-agent string is parsed. The two signals used are declarative and
14
+ * standardized:
15
+ * 1. `navigator.userAgentData.mobile` — the User-Agent Client Hints boolean.
16
+ * Authoritative where implemented (Chromium), in both directions.
17
+ * 2. The PRIMARY pointer (`(pointer: coarse)`) plus a touch digitizer.
18
+ * A phone/tablet reports a coarse primary pointer; a touchscreen laptop
19
+ * still reports its mouse as primary, so it is not misclassified.
20
+ */
21
+ import type { CommonsDeliveryPlatform } from '@oxyhq/core';
22
+ /**
23
+ * Which surface this app is running on, as `selectCommonsDelivery` models it.
24
+ *
25
+ * - Native (Expo/RN) is always `'mobile'`: it is an Oxy app installed on a
26
+ * phone/tablet, exactly the case where a verified Commons link can resolve
27
+ * on this very device.
28
+ * - A web browser is classified from the signals above.
29
+ * - Anything else — a browser-like environment with neither signal — is
30
+ * `'unknown'`, a first-class value that never opts into the deep link.
31
+ */
32
+ export declare function resolveDeliveryPlatform(): CommonsDeliveryPlatform;
33
+ //# sourceMappingURL=deliveryPlatform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deliveryPlatform.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/deliveryPlatform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAiB3D;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,IAAI,uBAAuB,CAgBjE"}
@@ -1,26 +1,21 @@
1
1
  import type { OxyServices } from '@oxyhq/core';
2
- export interface OAuthReturnCommitInput {
3
- sessionId: string;
4
- accessToken?: string;
5
- deviceId?: string;
6
- deviceSecret?: string;
7
- userId: string;
8
- expiresAt?: string;
9
- user?: {
10
- id: string;
11
- username?: string;
12
- avatar?: string;
13
- };
14
- }
2
+ import type { OAuthSessionCommitInput } from '../oauth/types.js';
15
3
  /**
16
- * When the RP lands with `?code=` after password sign-in at auth.oxy.so, exchange
17
- * the code for a device-first session before cold boot runs.
4
+ * When the RP lands with `?code=` after signing in at auth.oxy.so, exchange the
5
+ * code for a device-first session before cold boot runs.
6
+ *
7
+ * This is the REDIRECT transport's return leg. It owns only what is specific to
8
+ * a full-page round trip — reading the code off the URL, recovering the
9
+ * handshake `sessionStorage` carried across the navigation, and cleaning both up
10
+ * afterwards — and delegates state validation, the PKCE exchange, and the
11
+ * session commit to `completeOAuthCode`, the same function the popup transport
12
+ * runs.
18
13
  */
19
14
  export declare function tryCompleteOAuthReturn(opts: {
20
15
  oxyServices: OxyServices;
21
16
  clientId?: string | null;
22
17
  authRedirectUri?: string;
23
- commitSession: (input: OAuthReturnCommitInput) => Promise<void>;
18
+ commitSession: (input: OAuthSessionCommitInput) => Promise<void>;
24
19
  }): Promise<boolean>;
25
20
  /**
26
21
  * Rewrite the address bar after an authorize round trip, and tell the router.
@@ -1 +1 @@
1
- {"version":3,"file":"oauthReturn.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/oauthReturn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAU/C,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3D;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE,GAAG,OAAO,CAAC,OAAO,CAAC,CAiEnB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAuBpE;AAeD;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAmB/C"}
1
+ {"version":3,"file":"oauthReturn.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/oauthReturn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAS/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAgB,CAAC;AAG9D;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAClE,GAAG,OAAO,CAAC,OAAO,CAAC,CA6CnB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAuBpE;AAeD;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAgB/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/services",
3
- "version": "22.12.5",
3
+ "version": "22.13.1",
4
4
  "description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -126,17 +126,17 @@
126
126
  }
127
127
  },
128
128
  "dependencies": {
129
- "@oxyhq/contracts": "0.17.0",
130
- "@oxyhq/core": "^12.10.6",
129
+ "@oxyhq/contracts": "0.18.0",
130
+ "@oxyhq/core": "^12.11.0",
131
131
  "@simplewebauthn/browser": "^13.3.0",
132
132
  "color": "^4.2.3"
133
133
  },
134
134
  "devDependencies": {
135
135
  "@biomejs/biome": "^1.9.4",
136
- "@commitlint/cli": "^17.6.5",
137
- "@commitlint/config-conventional": "^17.6.5",
136
+ "@commitlint/cli": "^21.2.1",
137
+ "@commitlint/config-conventional": "^21.2.0",
138
138
  "@expo/vector-icons": "^15.0.3",
139
- "@oxyhq/core": "12.10.6",
139
+ "@oxyhq/core": "12.11.2",
140
140
  "@react-native-async-storage/async-storage": "^2.0.0",
141
141
  "@react-native-community/netinfo": "^11.4.1",
142
142
  "@react-native/babel-preset": "^0.86.0",
@@ -151,11 +151,12 @@
151
151
  "@types/node": "^20.19.43",
152
152
  "@types/react": "*",
153
153
  "copyfiles": "^2.4.1",
154
+ "expo-constants": "~57.0.5",
154
155
  "expo-file-system": "~57.0.1",
155
- "expo-font": "~57.0.1",
156
156
  "expo-haptics": "~57.0.1",
157
157
  "expo-image": "~57.0.1",
158
158
  "expo-linear-gradient": "~57.0.1",
159
+ "expo-notifications": "~57.0.5",
159
160
  "husky": "^4.3.8",
160
161
  "jest": "~29.7.0",
161
162
  "lint-staged": "^15.2.4",
@@ -176,8 +177,8 @@
176
177
  },
177
178
  "peerDependencies": {
178
179
  "@expo/vector-icons": "^15.0.3",
179
- "@oxyhq/bloom": "^0.50.2",
180
- "@oxyhq/core": "^12.10.6",
180
+ "@oxyhq/bloom": ">=0.59.0",
181
+ "@oxyhq/core": "^12.11.0",
181
182
  "@react-native-async-storage/async-storage": "^2.0.0",
182
183
  "@react-native-community/netinfo": "^11.4.1",
183
184
  "@tanstack/query-async-storage-persister": "^5.101",
@@ -187,14 +188,15 @@
187
188
  "@types/react": "*",
188
189
  "@types/react-native": "*",
189
190
  "expo": ">=56.0.0",
191
+ "expo-constants": ">=56.0.0",
190
192
  "expo-document-picker": ">=56.0.0",
191
193
  "expo-file-system": ">=56.0.0",
192
- "expo-font": ">=13.0.0",
193
194
  "expo-haptics": ">=56.0.0",
194
195
  "expo-image": ">=2.0.0",
195
196
  "expo-image-manipulator": ">=56.0.0",
196
197
  "expo-image-picker": ">=56.0.0",
197
198
  "expo-linear-gradient": ">=56.0.0",
199
+ "expo-notifications": ">=56.0.0",
198
200
  "expo-modules-core": "*",
199
201
  "nativewind": ">=5.0.0",
200
202
  "react": ">=18.0.0",
@@ -239,6 +241,12 @@
239
241
  "expo-image-manipulator": {
240
242
  "optional": true
241
243
  },
244
+ "expo-constants": {
245
+ "optional": true
246
+ },
247
+ "expo-notifications": {
248
+ "optional": true
249
+ },
242
250
  "@tanstack/query-sync-storage-persister": {
243
251
  "optional": true
244
252
  },
package/src/index.ts CHANGED
@@ -36,11 +36,10 @@ export { useOxy } from './ui/context/OxyContext';
36
36
  export type { OxyContextState } from './ui/context/OxyContext';
37
37
  export { useAuth } from './ui/hooks/useAuth';
38
38
  export type { AuthState, AuthActions, UseAuthReturn } from './ui/hooks/useAuth';
39
-
40
- // ---------------------------------------------------------------------------
41
- // Font loading
42
- // ---------------------------------------------------------------------------
43
- export { FontLoader, setupFonts } from './ui/components/FontLoader';
39
+ // Thrown by `switchToAccount` / `switchSession` while `OxyProvider` runs with
40
+ // `sessionMode="identity"` — an identity-bound app authenticates as the owner of
41
+ // the local identity key and cannot switch accounts.
42
+ export { IdentityBoundSessionError } from './ui/session/identityBinding';
44
43
 
45
44
  // ---------------------------------------------------------------------------
46
45
  // Zustand stores
@@ -201,6 +200,26 @@ export type { HandleAuthErrorOptions } from './ui/utils/errorHandlers';
201
200
  export { useFileFiltering } from './ui/hooks/useFileFiltering';
202
201
  export type { ViewMode, SortBy, SortOrder } from './ui/hooks/useFileFiltering';
203
202
 
203
+ // ---------------------------------------------------------------------------
204
+ // Device notifications (the ONE `expo-notifications` adapter)
205
+ // ---------------------------------------------------------------------------
206
+ // The Expo-side half of push: permission, platform tag, and the EXPO push token
207
+ // `@oxyhq/core`'s `registerPushToken` accepts (never a raw APNs/FCM token).
208
+ // Native-only by construction — every entry point resolves its null/no-op result
209
+ // from `Platform.OS` before `expo-notifications` is ever imported, and both
210
+ // `expo-notifications` and `expo-constants` are OPTIONAL peers.
211
+ export {
212
+ pushTokenPlatform,
213
+ hasNotificationPermission,
214
+ requestNotificationPermission,
215
+ getExpoPushToken,
216
+ takeLaunchNotificationData,
217
+ ensureNotificationChannel,
218
+ installForegroundNotificationHandler,
219
+ subscribeToNotificationResponses,
220
+ } from './notifications/deviceNotifications';
221
+ export type { NotificationChannelImportance, NotificationChannelSpec, ForegroundPresentation } from './notifications/deviceNotifications';
222
+
204
223
  // ---------------------------------------------------------------------------
205
224
  // UI components
206
225
  // ---------------------------------------------------------------------------
@@ -210,6 +229,21 @@ export {
210
229
  } from '@oxyhq/core';
211
230
  export { default as OxySignInButton } from './ui/components/OxySignInButton';
212
231
  export type { OxySignInButtonProps, OxyOAuthResult } from './ui/components/OxySignInButton';
232
+
233
+ // Web OAuth transport (popup / redirect). RPs that ship their own sign-in
234
+ // button call `useOxy().startWebOAuthSignIn(...)`; only the popup opener is
235
+ // exported, because it MUST run synchronously inside the press handler to keep
236
+ // the browser's user-gesture attribution.
237
+ export { openOAuthPopup } from './ui/oauth/oauthPopup';
238
+ export type { StartWebOAuthSignInOptions } from './ui/oauth/browserAuthTransport';
239
+ export type {
240
+ WebAuthMode,
241
+ WebOAuthSignInResult,
242
+ WebOAuthRedirectReason,
243
+ WebOAuthFailureReason,
244
+ WebOAuthUnsupportedReason,
245
+ OAuthPopupHandle,
246
+ } from './ui/oauth/types';
213
247
  export { OxyAuthPrompt } from './ui/components/OxyAuthPrompt';
214
248
  export type { OxyAuthPromptProps } from './ui/components/OxyAuthPrompt';
215
249
  export { OxyOAuthCallback } from './ui/components/OxyOAuthCallback';
@@ -249,6 +283,18 @@ export type { ProfileButtonProps } from './ui/components/ProfileButton';
249
283
  export { default as OxyAuthChooser } from './ui/components/OxyAuthChooser';
250
284
  export type { OxyAuthChooserProps } from './ui/components/OxyAuthChooser';
251
285
 
286
+ // The in-flight "Sign in with Oxy" REQUEST surface — the route's primary visual,
287
+ // the progress line, and the "Having trouble?" alternatives — as a purely
288
+ // presentational component driven by plain facts. `OxyAuthChooser` renders it
289
+ // from `AccountDialogController`'s device flow; a host with a request of its own
290
+ // (the auth.oxy.so IdP's OAuth-bound lane) renders the SAME component from its
291
+ // own facts, so there is one implementation of this surface, not two. It needs
292
+ // no controller: `route` + `progress` + `qrPayload` + the failure flags are the
293
+ // whole contract, and none of them is a secret credential.
294
+ export { OxySignInRequestSurface } from './ui/components/OxySignInRequestSurface';
295
+ export type { OxySignInRequestSurfaceProps } from './ui/components/OxySignInRequestSurface';
296
+ export type { OxySignInSurfaceAction } from './ui/components/authChooser/types';
297
+
252
298
  // Unified switchable-accounts hook — the single source of everything the user
253
299
  // can switch into: device sign-ins AND linked graph accounts (owned orgs +
254
300
  // shared-with-you), deduped by account id and hydrated with real