@oxyhq/services 22.13.0 → 23.0.0

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 (445) hide show
  1. package/README.md +1 -1
  2. package/lib/commonjs/index.js +74 -0
  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 +20 -64
  7. package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
  8. package/lib/commonjs/ui/components/AvatarCameraBadge.js +3 -2
  9. package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -1
  10. package/lib/commonjs/ui/components/OxyAuthChooser.js +5 -4
  11. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  12. package/lib/commonjs/ui/components/OxyProvider.js +5 -6
  13. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  14. package/lib/commonjs/ui/components/OxySignInRequestSurface.js +147 -0
  15. package/lib/commonjs/ui/components/OxySignInRequestSurface.js.map +1 -0
  16. package/lib/commonjs/ui/components/ProfileButton.js +4 -3
  17. package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
  18. package/lib/commonjs/ui/components/SettingsIcon.js +3 -2
  19. package/lib/commonjs/ui/components/SettingsIcon.js.map +1 -1
  20. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +7 -7
  21. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  22. package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +1 -1
  23. package/lib/commonjs/ui/components/authChooser/SignInRequestView.js +65 -103
  24. package/lib/commonjs/ui/components/authChooser/SignInRequestView.js.map +1 -1
  25. package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js +0 -2
  26. package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js.map +1 -1
  27. package/lib/commonjs/ui/components/authChooser/primitives.js +5 -4
  28. package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
  29. package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +14 -10
  30. package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -1
  31. package/lib/commonjs/ui/components/authChooser/types.js +11 -0
  32. package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
  33. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +3 -2
  34. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -1
  35. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +3 -2
  36. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  37. package/lib/commonjs/ui/components/fileManagement/FileViewer.js +15 -14
  38. package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
  39. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +6 -5
  40. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
  41. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +3 -2
  42. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
  43. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +6 -6
  44. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  45. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +5 -5
  46. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
  47. package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +10 -9
  48. package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
  49. package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +4 -3
  50. package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
  51. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +6 -5
  52. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
  53. package/lib/commonjs/ui/components/styles/shadow.js.map +1 -1
  54. package/lib/commonjs/ui/context/OxyContext.js +14 -45
  55. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  56. package/lib/commonjs/ui/context/commitSessionFlow.js +0 -43
  57. package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
  58. package/lib/commonjs/ui/context/useOxyAccountGraph.js +3 -4
  59. package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
  60. package/lib/commonjs/ui/hooks/queries/userCache.js +17 -17
  61. package/lib/commonjs/ui/hooks/queries/userCache.js.map +1 -1
  62. package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
  63. package/lib/commonjs/ui/hooks/useAuth.js +4 -2
  64. package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
  65. package/lib/commonjs/ui/hooks/useOnlineStatus.js +3 -2
  66. package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -1
  67. package/lib/commonjs/ui/hooks/useSessionManagement.js +0 -2
  68. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  69. package/lib/commonjs/ui/screens/AccountMembersScreen.js +4 -3
  70. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  71. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +1 -1
  72. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/CreateAccountScreen.js +7 -6
  74. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  75. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +4 -3
  76. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  77. package/lib/commonjs/ui/screens/FAQScreen.js +3 -2
  78. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/FeedbackScreen.js +96 -96
  80. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/FileManagementScreen.js +19 -18
  82. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  83. package/lib/commonjs/ui/screens/HistoryViewScreen.js +4 -29
  84. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  85. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +4 -3
  86. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  87. package/lib/commonjs/ui/screens/ManageAccountScreen.js +2 -2
  88. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  89. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -3
  90. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  91. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +10 -9
  92. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  93. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +1 -0
  94. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  95. package/lib/commonjs/ui/screens/ProfileScreen.js +12 -13
  96. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  97. package/lib/commonjs/ui/screens/UserListScreen.js +4 -4
  98. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  99. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +6 -6
  100. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  101. package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +4 -3
  102. package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
  103. package/lib/commonjs/ui/screens/fileManagement/FileListSection.js +4 -3
  104. package/lib/commonjs/ui/screens/fileManagement/FileListSection.js.map +1 -1
  105. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +5 -7
  106. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  107. package/lib/commonjs/ui/screens/fileManagement/UploadBar.js +3 -2
  108. package/lib/commonjs/ui/screens/fileManagement/UploadBar.js.map +1 -1
  109. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +3 -2
  110. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  111. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +5 -4
  112. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  113. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +4 -3
  114. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  115. package/lib/commonjs/ui/utils/fileManagement.js +24 -24
  116. package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
  117. package/lib/commonjs/ui/utils/netConnectivity.js +28 -0
  118. package/lib/commonjs/ui/utils/netConnectivity.js.map +1 -0
  119. package/lib/commonjs/ui/utils/oauthReturn.js +15 -28
  120. package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
  121. package/lib/module/index.js +18 -0
  122. package/lib/module/index.js.map +1 -1
  123. package/lib/module/notifications/deviceNotifications.js +414 -0
  124. package/lib/module/notifications/deviceNotifications.js.map +1 -0
  125. package/lib/module/ui/boot/runProviderColdBoot.js +21 -65
  126. package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
  127. package/lib/module/ui/components/AvatarCameraBadge.js +1 -1
  128. package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -1
  129. package/lib/module/ui/components/OxyAuthChooser.js +5 -4
  130. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  131. package/lib/module/ui/components/OxyProvider.js +5 -6
  132. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  133. package/lib/module/ui/components/OxySignInRequestSurface.js +141 -0
  134. package/lib/module/ui/components/OxySignInRequestSurface.js.map +1 -0
  135. package/lib/module/ui/components/ProfileButton.js +1 -1
  136. package/lib/module/ui/components/ProfileButton.js.map +1 -1
  137. package/lib/module/ui/components/SettingsIcon.js +1 -1
  138. package/lib/module/ui/components/SettingsIcon.js.map +1 -1
  139. package/lib/module/ui/components/authChooser/AccountsMenuView.js +1 -1
  140. package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  141. package/lib/module/ui/components/authChooser/SignInEntryView.js.map +1 -1
  142. package/lib/module/ui/components/authChooser/SignInRequestView.js +66 -104
  143. package/lib/module/ui/components/authChooser/SignInRequestView.js.map +1 -1
  144. package/lib/module/ui/components/authChooser/TroubleDisclosure.js +0 -2
  145. package/lib/module/ui/components/authChooser/TroubleDisclosure.js.map +1 -1
  146. package/lib/module/ui/components/authChooser/primitives.js +1 -1
  147. package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
  148. package/lib/module/ui/components/authChooser/requestSurfaces.js +13 -9
  149. package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -1
  150. package/lib/module/ui/components/authChooser/types.js +11 -0
  151. package/lib/module/ui/components/authChooser/types.js.map +1 -1
  152. package/lib/module/ui/components/fileManagement/AnimatedButton.js +1 -1
  153. package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -1
  154. package/lib/module/ui/components/fileManagement/FileDetailsModal.js +1 -1
  155. package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  156. package/lib/module/ui/components/fileManagement/FileViewer.js +1 -1
  157. package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
  158. package/lib/module/ui/components/fileManagement/UploadPreview.js +1 -1
  159. package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
  160. package/lib/module/ui/components/modals/DeleteAccountModal.js +1 -1
  161. package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
  162. package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
  163. package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  164. package/lib/module/ui/components/payment/PaymentMethodStep.js +1 -1
  165. package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
  166. package/lib/module/ui/components/payment/PaymentReviewStep.js +1 -1
  167. package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
  168. package/lib/module/ui/components/payment/PaymentSuccessStep.js +1 -1
  169. package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
  170. package/lib/module/ui/components/payment/PaymentSummaryStep.js +1 -1
  171. package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
  172. package/lib/module/ui/components/styles/shadow.js.map +1 -1
  173. package/lib/module/ui/context/OxyContext.js +16 -47
  174. package/lib/module/ui/context/OxyContext.js.map +1 -1
  175. package/lib/module/ui/context/commitSessionFlow.js +0 -42
  176. package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
  177. package/lib/module/ui/context/useOxyAccountGraph.js +3 -4
  178. package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
  179. package/lib/module/ui/hooks/queries/userCache.js +17 -17
  180. package/lib/module/ui/hooks/queries/userCache.js.map +1 -1
  181. package/lib/module/ui/hooks/useAssets.js.map +1 -1
  182. package/lib/module/ui/hooks/useAuth.js +4 -2
  183. package/lib/module/ui/hooks/useAuth.js.map +1 -1
  184. package/lib/module/ui/hooks/useOnlineStatus.js +3 -2
  185. package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -1
  186. package/lib/module/ui/hooks/useSessionManagement.js +0 -2
  187. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  188. package/lib/module/ui/screens/AccountMembersScreen.js +1 -1
  189. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  190. package/lib/module/ui/screens/ConnectedAppsScreen.js +1 -1
  191. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
  192. package/lib/module/ui/screens/CreateAccountScreen.js +1 -1
  193. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  194. package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -1
  195. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  196. package/lib/module/ui/screens/FAQScreen.js +1 -1
  197. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  198. package/lib/module/ui/screens/FeedbackScreen.js +91 -90
  199. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  200. package/lib/module/ui/screens/FileManagementScreen.js +2 -1
  201. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  202. package/lib/module/ui/screens/HistoryViewScreen.js +4 -29
  203. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  204. package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
  205. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  206. package/lib/module/ui/screens/ManageAccountScreen.js +1 -1
  207. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  208. package/lib/module/ui/screens/PaymentGatewayScreen.js +1 -1
  209. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  210. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +2 -2
  211. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  212. package/lib/module/ui/screens/PrivacySettingsScreen.js +1 -0
  213. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  214. package/lib/module/ui/screens/ProfileScreen.js +4 -5
  215. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  216. package/lib/module/ui/screens/UserListScreen.js +3 -3
  217. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  218. package/lib/module/ui/screens/WelcomeNewUserScreen.js +5 -6
  219. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  220. package/lib/module/ui/screens/fileManagement/FileLibraryError.js +1 -1
  221. package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
  222. package/lib/module/ui/screens/fileManagement/FileListSection.js +1 -1
  223. package/lib/module/ui/screens/fileManagement/FileListSection.js.map +1 -1
  224. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +3 -5
  225. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  226. package/lib/module/ui/screens/fileManagement/UploadBar.js +1 -1
  227. package/lib/module/ui/screens/fileManagement/UploadBar.js.map +1 -1
  228. package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
  229. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  230. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +3 -3
  231. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  232. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +1 -1
  233. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  234. package/lib/module/ui/utils/fileManagement.js +25 -25
  235. package/lib/module/ui/utils/fileManagement.js.map +1 -1
  236. package/lib/module/ui/utils/netConnectivity.js +23 -0
  237. package/lib/module/ui/utils/netConnectivity.js.map +1 -0
  238. package/lib/module/ui/utils/oauthReturn.js +15 -27
  239. package/lib/module/ui/utils/oauthReturn.js.map +1 -1
  240. package/lib/typescript/commonjs/index.d.ts +5 -0
  241. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +173 -0
  243. package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -0
  244. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +11 -30
  245. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +5 -3
  247. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts +108 -0
  250. package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
  251. package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts +1 -1
  252. package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts +18 -18
  255. package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts +3 -10
  257. package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +8 -4
  259. package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +18 -0
  261. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/ui/components/payment/types.d.ts +6 -6
  263. package/lib/typescript/commonjs/ui/components/payment/types.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +0 -40
  266. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +4 -7
  268. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +0 -1
  270. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts +2 -2
  272. package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts.map +1 -1
  273. package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
  274. package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
  275. package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts +2 -2
  276. package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts.map +1 -1
  277. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +4 -2
  278. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +3 -2
  280. package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts +2 -2
  283. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  285. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  286. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  289. package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  291. package/lib/typescript/commonjs/ui/types/navigation.d.ts +20 -19
  292. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  293. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +5 -5
  294. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts +17 -0
  296. package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts.map +1 -0
  297. package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +15 -12
  298. package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
  299. package/lib/typescript/module/index.d.ts +5 -0
  300. package/lib/typescript/module/index.d.ts.map +1 -1
  301. package/lib/typescript/module/notifications/deviceNotifications.d.ts +173 -0
  302. package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -0
  303. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +11 -30
  304. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  305. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +5 -3
  306. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  307. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  308. package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts +108 -0
  309. package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
  310. package/lib/typescript/module/ui/components/SettingsIcon.d.ts +1 -1
  311. package/lib/typescript/module/ui/components/SettingsIcon.d.ts.map +1 -1
  312. package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +1 -1
  313. package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts +18 -18
  314. package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
  315. package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts +3 -10
  316. package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -1
  317. package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +8 -4
  318. package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
  319. package/lib/typescript/module/ui/components/authChooser/types.d.ts +18 -0
  320. package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
  321. package/lib/typescript/module/ui/components/payment/types.d.ts +6 -6
  322. package/lib/typescript/module/ui/components/payment/types.d.ts.map +1 -1
  323. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  324. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +0 -40
  325. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
  326. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +4 -7
  327. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
  328. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +0 -1
  329. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  330. package/lib/typescript/module/ui/hooks/queries/userCache.d.ts +2 -2
  331. package/lib/typescript/module/ui/hooks/queries/userCache.d.ts.map +1 -1
  332. package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
  333. package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
  334. package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts +2 -2
  335. package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts.map +1 -1
  336. package/lib/typescript/module/ui/hooks/useAuth.d.ts +4 -2
  337. package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
  338. package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +3 -2
  339. package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -1
  340. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  341. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +2 -2
  342. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  343. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  344. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  345. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  346. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  347. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  348. package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
  349. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  350. package/lib/typescript/module/ui/types/navigation.d.ts +20 -19
  351. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  352. package/lib/typescript/module/ui/utils/fileManagement.d.ts +5 -5
  353. package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
  354. package/lib/typescript/module/ui/utils/netConnectivity.d.ts +17 -0
  355. package/lib/typescript/module/ui/utils/netConnectivity.d.ts.map +1 -0
  356. package/lib/typescript/module/ui/utils/oauthReturn.d.ts +15 -12
  357. package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
  358. package/package.json +18 -8
  359. package/src/index.ts +32 -0
  360. package/src/notifications/deviceNotifications.ts +458 -0
  361. package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +215 -0
  362. package/src/ui/boot/runProviderColdBoot.ts +24 -101
  363. package/src/ui/components/AvatarCameraBadge.tsx +1 -1
  364. package/src/ui/components/OxyAuthChooser.tsx +5 -4
  365. package/src/ui/components/OxyProvider.tsx +5 -6
  366. package/src/ui/components/OxySignInRequestSurface.tsx +202 -0
  367. package/src/ui/components/ProfileButton.tsx +1 -1
  368. package/src/ui/components/SettingsIcon.tsx +1 -1
  369. package/src/ui/components/authChooser/AccountsMenuView.tsx +1 -1
  370. package/src/ui/components/authChooser/SignInEntryView.tsx +9 -3
  371. package/src/ui/components/authChooser/SignInRequestView.tsx +78 -111
  372. package/src/ui/components/authChooser/TroubleDisclosure.tsx +3 -11
  373. package/src/ui/components/authChooser/primitives.tsx +1 -1
  374. package/src/ui/components/authChooser/requestSurfaces.tsx +15 -11
  375. package/src/ui/components/authChooser/types.ts +19 -0
  376. package/src/ui/components/fileManagement/AnimatedButton.tsx +1 -1
  377. package/src/ui/components/fileManagement/FileDetailsModal.tsx +1 -1
  378. package/src/ui/components/fileManagement/FileViewer.tsx +1 -1
  379. package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
  380. package/src/ui/components/modals/DeleteAccountModal.tsx +1 -1
  381. package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
  382. package/src/ui/components/payment/PaymentMethodStep.tsx +1 -1
  383. package/src/ui/components/payment/PaymentReviewStep.tsx +1 -1
  384. package/src/ui/components/payment/PaymentSuccessStep.tsx +1 -1
  385. package/src/ui/components/payment/PaymentSummaryStep.tsx +1 -1
  386. package/src/ui/components/payment/types.ts +24 -24
  387. package/src/ui/components/styles/shadow.tsx +2 -2
  388. package/src/ui/context/OxyContext.tsx +15 -46
  389. package/src/ui/context/__tests__/commitSessionFlow.test.ts +0 -89
  390. package/src/ui/context/commitSessionFlow.ts +0 -61
  391. package/src/ui/context/oxyContextTypes.ts +4 -7
  392. package/src/ui/context/useOxyAccountGraph.ts +4 -4
  393. package/src/ui/hooks/queries/userCache.ts +169 -148
  394. package/src/ui/hooks/useAssets.ts +1 -1
  395. package/src/ui/hooks/useAsyncAction.ts +2 -2
  396. package/src/ui/hooks/useAuth.ts +4 -2
  397. package/src/ui/hooks/useOnlineStatus.ts +3 -2
  398. package/src/ui/hooks/useSessionManagement.ts +0 -2
  399. package/src/ui/screens/AccountMembersScreen.tsx +1 -1
  400. package/src/ui/screens/ConnectedAppsScreen.tsx +1 -1
  401. package/src/ui/screens/CreateAccountScreen.tsx +1 -1
  402. package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
  403. package/src/ui/screens/FAQScreen.tsx +1 -1
  404. package/src/ui/screens/FeedbackScreen.tsx +740 -574
  405. package/src/ui/screens/FileManagementScreen.tsx +2 -1
  406. package/src/ui/screens/HistoryViewScreen.tsx +4 -19
  407. package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
  408. package/src/ui/screens/ManageAccountScreen.tsx +1 -1
  409. package/src/ui/screens/PaymentGatewayScreen.tsx +1 -1
  410. package/src/ui/screens/PremiumSubscriptionScreen.tsx +2 -2
  411. package/src/ui/screens/PrivacySettingsScreen.tsx +1 -0
  412. package/src/ui/screens/ProfileScreen.tsx +6 -4
  413. package/src/ui/screens/UserListScreen.tsx +3 -3
  414. package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
  415. package/src/ui/screens/fileManagement/FileLibraryError.tsx +1 -1
  416. package/src/ui/screens/fileManagement/FileListSection.tsx +1 -1
  417. package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +3 -2
  418. package/src/ui/screens/fileManagement/UploadBar.tsx +1 -1
  419. package/src/ui/screens/trust/TrustCenterScreen.tsx +1 -1
  420. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +4 -3
  421. package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
  422. package/src/ui/types/navigation.ts +20 -19
  423. package/src/ui/utils/fileManagement.ts +108 -92
  424. package/src/ui/utils/netConnectivity.ts +27 -0
  425. package/src/ui/utils/oauthReturn.ts +15 -30
  426. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +0 -48
  427. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +0 -1
  428. package/lib/commonjs/ui/utils/crossOriginRestore.js +0 -140
  429. package/lib/commonjs/ui/utils/crossOriginRestore.js.map +0 -1
  430. package/lib/module/ui/oauth/legacyRedirectLanes.js +0 -44
  431. package/lib/module/ui/oauth/legacyRedirectLanes.js.map +0 -1
  432. package/lib/module/ui/utils/crossOriginRestore.js +0 -131
  433. package/lib/module/ui/utils/crossOriginRestore.js.map +0 -1
  434. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +0 -40
  435. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
  436. package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +0 -43
  437. package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +0 -1
  438. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +0 -40
  439. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
  440. package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +0 -43
  441. package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +0 -1
  442. package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +0 -281
  443. package/src/ui/oauth/legacyRedirectLanes.ts +0 -43
  444. package/src/ui/utils/__tests__/crossOriginRestore.test.ts +0 -160
  445. package/src/ui/utils/crossOriginRestore.ts +0 -168
@@ -26,7 +26,6 @@ import {
26
26
  startTokenRefreshScheduler,
27
27
  createAccountDialogController,
28
28
  logger as loggerUtil,
29
- syncHubAfterSignIn,
30
29
  } from '@oxyhq/core';
31
30
  import {
32
31
  registerAccountDialogControls,
@@ -79,7 +78,7 @@ import type {
79
78
  CommitInput,
80
79
  } from './oxyContextTypes';
81
80
  import { DEFAULT_SESSION_VALIDITY_MS, loadUseFollowHook } from './oxyContextHelpers';
82
- import { commitDeviceSetAndResolve, maybeSyncHubAfterCommit } from './commitSessionFlow';
81
+ import { commitDeviceSetAndResolve } from './commitSessionFlow';
83
82
  import { runPasskeyLogin, runPasskeyRegister, runPasskeyAdd } from './passkeyFlow';
84
83
  import {
85
84
  isPasskeySupported,
@@ -103,8 +102,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
103
102
  storageKeyPrefix = 'oxy_session',
104
103
  clientId: clientIdProp,
105
104
  sessionMode = 'account',
106
- webAuthMode = 'redirect',
107
- hubSync = true,
105
+ webAuthMode = 'popup',
108
106
  onAuthStateChange,
109
107
  onError,
110
108
  }) => {
@@ -586,7 +584,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
586
584
  };
587
585
  handleTokenChange(oxyServices.getAccessToken());
588
586
  return oxyServices.onTokensChanged(handleTokenChange);
589
- }, [logger, oxyServices]);
587
+ }, [logger, oxyServices, sessionClient]);
590
588
 
591
589
  // Unified in-session refresh (SDK-owned; every RP inherits it). Installs the
592
590
  // ONE core refresh handler (re-mint from the persisted zero-cookie device
@@ -616,10 +614,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
616
614
  // Used by the QR device flow (`handleWebSession`), password sign-in, 2FA
617
615
  // completion, and the cold boot.
618
616
  const commitSession = useCallback(
619
- async (
620
- input: CommitInput,
621
- options: { activate: boolean; hubSync?: boolean },
622
- ): Promise<void> => {
617
+ async (input: CommitInput, options: { activate: boolean }): Promise<void> => {
623
618
  if (input.accessToken) {
624
619
  oxyServices.setTokens(input.accessToken);
625
620
  }
@@ -687,21 +682,8 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
687
682
  onAuthStateChange: onAuthStateChangeRef.current,
688
683
  markAuthResolved: markAuthResolvedRef.current,
689
684
  });
690
-
691
- // Post-sign-in hub sync — a full-page redirect to auth.oxy.so. Gated HERE,
692
- // inside the ONE commit funnel, so NO commit path (QR device flow,
693
- // password/2FA through the account dialog, passkey, popup OAuth, cold
694
- // boot) can bounce a `webAuthMode: 'popup'` tab to the IdP. See
695
- // `maybeSyncHubAfterCommit` for the full gate list.
696
- await maybeSyncHubAfterCommit({
697
- activate: options.activate,
698
- hubSyncRequested: options.hubSync === true,
699
- hubSyncEnabled: hubSync,
700
- webAuthMode,
701
- syncHub: () => syncHubAfterSignIn(oxyServices, { enabled: hubSync }),
702
- });
703
685
  },
704
- [oxyServices, authStore, updateSessions, setActiveSessionId, sessionClient, sessionClientHost, syncFromClient, loginSuccess, logger, hubSync, webAuthMode],
686
+ [oxyServices, authStore, updateSessions, setActiveSessionId, sessionClient, sessionClientHost, syncFromClient, loginSuccess, logger],
705
687
  );
706
688
  const commitSessionRef = useRef(commitSession);
707
689
  commitSessionRef.current = commitSession;
@@ -723,16 +705,16 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
723
705
  userId: session.user.id,
724
706
  user: session.user,
725
707
  },
726
- { activate: true, hubSync: true },
708
+ { activate: true },
727
709
  );
728
710
  },
729
711
  [commitSession],
730
712
  );
731
713
 
732
- // Commit a minted graph-SWITCH session. Same funnel as `handleWebSession` but
733
- // IN-PLACE: `hubSync: false` so switching accounts never triggers the
734
- // cross-origin hub-sync full-page redirect. The switch already propagates
735
- // across tabs/apps via the server's `session_state` socket broadcast.
714
+ // Commit a minted graph-SWITCH session through the same funnel as
715
+ // `handleWebSession`. Nothing extra to do IN-PLACE: the switch already
716
+ // propagates across tabs/apps via the server's `session_state` socket
717
+ // broadcast.
736
718
  const commitSwitchedSession = useCallback(
737
719
  async (session: SessionLoginResponse): Promise<void> => {
738
720
  if (!session?.user || !session?.sessionId || !session.accessToken) {
@@ -748,7 +730,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
748
730
  userId: session.user.id,
749
731
  user: session.user,
750
732
  },
751
- { activate: true, hubSync: false },
733
+ { activate: true },
752
734
  );
753
735
  },
754
736
  [commitSession],
@@ -759,11 +741,6 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
759
741
  // to, so no consumer ever writes popup listeners or a token exchange. The
760
742
  // transport picks popup vs redirect from `webAuthMode`; both lanes land on the
761
743
  // SAME completion path (`completeOAuthCode`) and the same commit funnel here.
762
- //
763
- // `hubSync: false` is deliberate: hub sync is a full-page redirect to
764
- // auth.oxy.so, which would undo the one thing popup mode exists to guarantee —
765
- // that the relying party never leaves its route. It matches how the redirect
766
- // lane's return leg commits (see `runProviderColdBoot`).
767
744
  const startWebOAuthSignInForContext = useCallback(
768
745
  (options: StartWebOAuthSignInOptions): Promise<WebOAuthSignInResult> =>
769
746
  startWebOAuthSignIn(
@@ -773,8 +750,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
773
750
  clientId,
774
751
  authorizeBaseUrl,
775
752
  identityBound: isIdentityBound,
776
- commitSession: (input) =>
777
- commitSessionRef.current(input, { activate: true, hubSync: false }),
753
+ commitSession: (input) => commitSessionRef.current(input, { activate: true }),
778
754
  },
779
755
  options,
780
756
  ),
@@ -973,7 +949,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
973
949
  getLoginOptions: (username) => oxyServices.webauthnLoginOptions(username),
974
950
  runCeremony: runAuthenticationCeremony,
975
951
  loginVerify: (response, envelope) => oxyServices.webauthnLoginVerify(response, envelope),
976
- commit: (input) => commitSession(input, { activate: true, hubSync: true }),
952
+ commit: (input) => commitSession(input, { activate: true }),
977
953
  username: opts?.username,
978
954
  deviceId: persisted?.deviceId,
979
955
  deviceName: opts?.deviceName,
@@ -991,7 +967,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
991
967
  getRegisterOptions: (username) => oxyServices.webauthnRegisterOptions(username),
992
968
  runCeremony: runRegistrationCeremony,
993
969
  registerVerify: (response, envelope) => oxyServices.webauthnRegisterVerify(response, envelope),
994
- commit: (input) => commitSession(input, { activate: true, hubSync: true }),
970
+ commit: (input) => commitSession(input, { activate: true }),
995
971
  username: params.username,
996
972
  deviceName: params.deviceName,
997
973
  });
@@ -1043,13 +1019,8 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
1043
1019
  authStore,
1044
1020
  clientId: clientIdProp,
1045
1021
  authRedirectUri,
1046
- authorizeBaseUrl,
1047
1022
  sessionMode,
1048
1023
  identity: identity?.binding,
1049
- // Popup mode forbids the boot's automatic full-page `prompt=none` restore:
1050
- // a domain with no local credential resolves signed out instead of
1051
- // navigating the tab to the IdP (see `allowsAutomaticIdpRedirect`).
1052
- webAuthMode,
1053
1024
  sessionClient,
1054
1025
  syncDeviceCredentialToHost,
1055
1026
  commitSession: (input, options) => commitSessionRef.current(input, options),
@@ -1067,10 +1038,8 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
1067
1038
  authStore,
1068
1039
  clientIdProp,
1069
1040
  authRedirectUri,
1070
- authorizeBaseUrl,
1071
1041
  sessionMode,
1072
1042
  identity,
1073
- webAuthMode,
1074
1043
  syncDeviceCredentialToHost,
1075
1044
  sessionClient,
1076
1045
  ]);
@@ -1372,7 +1341,7 @@ const LOADING_STATE: OxyContextState = {
1372
1341
  isAuthResolved: false,
1373
1342
  isStorageReady: false,
1374
1343
  sessionMode: 'account',
1375
- webAuthMode: 'redirect',
1344
+ webAuthMode: 'popup',
1376
1345
  error: null,
1377
1346
  currentLanguage: 'en-US',
1378
1347
  currentLanguages: [],
@@ -1,11 +1,8 @@
1
1
  import type { User } from '@oxyhq/core';
2
2
  import { logger } from '@oxyhq/core';
3
- import type { WebAuthMode } from '../../oauth/types';
4
3
  import {
5
4
  commitDeviceSetAndResolve,
6
- maybeSyncHubAfterCommit,
7
5
  type CommitDeviceSetAndResolveDeps,
8
- type MaybeSyncHubAfterCommitDeps,
9
6
  } from '../commitSessionFlow';
10
7
 
11
8
  // A resolved promise chain (addCurrentAccount -> start -> syncFromClient) settles
@@ -194,92 +191,6 @@ describe('commitDeviceSetAndResolve — cold boot (activate: false)', () => {
194
191
  });
195
192
  });
196
193
 
197
- /**
198
- * Post-sign-in hub sync is a FULL-PAGE redirect to auth.oxy.so. It runs from the
199
- * ONE commit funnel, so gating it here gates every commit path at once —
200
- * `webAuthMode: 'popup'` must never bounce the tab, whichever path signed the
201
- * user in (#691 phase 7).
202
- */
203
- describe('maybeSyncHubAfterCommit — webAuthMode transport gate (#691 phase 7)', () => {
204
- const buildHubDeps = (
205
- overrides: Partial<MaybeSyncHubAfterCommitDeps> = {},
206
- ): MaybeSyncHubAfterCommitDeps => ({
207
- activate: true,
208
- hubSyncRequested: true,
209
- hubSyncEnabled: true,
210
- webAuthMode: 'redirect',
211
- syncHub: jest.fn(async () => true),
212
- ...overrides,
213
- });
214
-
215
- it("redirect mode: syncs the hub after a deliberate sign-in (unchanged)", async () => {
216
- const deps = buildHubDeps();
217
-
218
- await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(true);
219
-
220
- expect(deps.syncHub).toHaveBeenCalledTimes(1);
221
- });
222
-
223
- it('popup mode: NEVER syncs the hub, even on an otherwise-eligible sign-in', async () => {
224
- const deps = buildHubDeps({ webAuthMode: 'popup' });
225
-
226
- await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(false);
227
-
228
- expect(deps.syncHub).not.toHaveBeenCalled();
229
- });
230
-
231
- it('popup mode: no commit path can opt back in', async () => {
232
- // Every commit path differs only in `activate` / `hubSyncRequested`; the
233
- // transport gate outranks all of them.
234
- for (const activate of [true, false]) {
235
- for (const hubSyncRequested of [true, false]) {
236
- const deps = buildHubDeps({ webAuthMode: 'popup', activate, hubSyncRequested });
237
- await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(false);
238
- expect(deps.syncHub).not.toHaveBeenCalled();
239
- }
240
- }
241
- });
242
-
243
- it.each(['popup', 'redirect'] as const)(
244
- 'never syncs on a cold-boot restore, in either mode (%s)',
245
- async (webAuthMode: WebAuthMode) => {
246
- const deps = buildHubDeps({ webAuthMode, activate: false });
247
-
248
- await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(false);
249
-
250
- expect(deps.syncHub).not.toHaveBeenCalled();
251
- },
252
- );
253
-
254
- it('redirect mode: honours the per-commit opt-out (account switch / popup OAuth lanes)', async () => {
255
- const deps = buildHubDeps({ hubSyncRequested: false });
256
-
257
- await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(false);
258
-
259
- expect(deps.syncHub).not.toHaveBeenCalled();
260
- });
261
-
262
- it('redirect mode: honours the provider-level hubSync opt-out', async () => {
263
- const deps = buildHubDeps({ hubSyncEnabled: false });
264
-
265
- await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(false);
266
-
267
- expect(deps.syncHub).not.toHaveBeenCalled();
268
- });
269
-
270
- it('redirect mode: a failing hub sync is non-fatal and never rejects', async () => {
271
- const deps = buildHubDeps({
272
- syncHub: jest.fn(async () => {
273
- throw new Error('hub ticket failed');
274
- }),
275
- });
276
-
277
- await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(false);
278
-
279
- expect(deps.syncHub).toHaveBeenCalledTimes(1);
280
- });
281
- });
282
-
283
194
  describe('commitDeviceSetAndResolve — deliberate sign-in (activate: true)', () => {
284
195
  it('BLOCKS on the device-set reconcile before resolving auth (unchanged ordering)', async () => {
285
196
  const order: string[] = [];
@@ -1,8 +1,5 @@
1
1
  import type { User } from '@oxyhq/core';
2
2
  import { logger as loggerUtil } from '@oxyhq/core';
3
- import { allowsAutomaticIdpRedirect } from '../oauth/legacyRedirectLanes';
4
- import type { WebAuthMode } from '../oauth/types';
5
- import { isWebBrowser } from '../utils/isWebBrowser';
6
3
  import { isUnauthorizedStatus } from './oxyContextHelpers';
7
4
 
8
5
  const LOG_CONTEXT = { component: 'OxyContext', method: 'commitSession' } as const;
@@ -129,61 +126,3 @@ export async function commitDeviceSetAndResolve(
129
126
  await hydrateAndResolve();
130
127
  void reconcileDeviceSet().catch(logReconcileError);
131
128
  }
132
-
133
- export interface MaybeSyncHubAfterCommitDeps {
134
- /** Deliberate sign-in (`true`) vs. a cold-boot / background commit (`false`). */
135
- activate: boolean;
136
- /** Per-commit opt-in — `commitSession`'s `options.hubSync`. */
137
- hubSyncRequested: boolean;
138
- /** Provider-level opt-out — `OxyProviderProps.hubSync`. */
139
- hubSyncEnabled: boolean;
140
- /**
141
- * The provider's web sign-in transport — `OxyProviderProps.webAuthMode`.
142
- * A first-class input: `'popup'` forbids the redirect outright.
143
- */
144
- webAuthMode: WebAuthMode;
145
- /**
146
- * Starts the full-page hop to `auth.oxy.so/sync`; resolves `true` when the
147
- * navigation was actually started.
148
- */
149
- syncHub: () => Promise<boolean>;
150
- }
151
-
152
- /**
153
- * Post-sign-in hub sync: plant this device's credential on the IdP hub so OTHER
154
- * official origins can silently restore a session on their next cold boot.
155
- *
156
- * The tail of the ONE commit funnel (`commitSession`), extracted so every gate
157
- * on this legacy lane lives — and is tested — in one place. Returns whether the
158
- * full-page redirect was started; a failure is non-fatal and never propagates
159
- * (the sign-in itself already succeeded).
160
- *
161
- * Four gates, all of which must pass:
162
- * 1. `activate` — only a deliberate sign-in syncs; a cold-boot restore never does.
163
- * 2. `hubSyncRequested` — the in-place lanes (account switch, popup OAuth) opt out.
164
- * 3. `hubSyncEnabled` — the provider-level `hubSync` prop.
165
- * 4. `allowsAutomaticIdpRedirect(webAuthMode)` — hub sync REPLACES the document
166
- * with `auth.oxy.so`, so `webAuthMode: 'popup'` forbids it: a redirect that
167
- * bounces the tab defeats the entire point of the mode, no matter which
168
- * commit path produced the session (issue #691, "Cold boot and cross-domain
169
- * behavior"). Redirect mode — the default and the compatibility path — is
170
- * unchanged, and this whole function disappears with it in phase 7b.
171
- */
172
- export async function maybeSyncHubAfterCommit(
173
- deps: MaybeSyncHubAfterCommitDeps,
174
- ): Promise<boolean> {
175
- const { activate, hubSyncRequested, hubSyncEnabled, webAuthMode, syncHub } = deps;
176
-
177
- if (!activate || !hubSyncRequested || !hubSyncEnabled) return false;
178
- if (!allowsAutomaticIdpRedirect(webAuthMode)) return false;
179
- if (!isWebBrowser()) return false;
180
-
181
- try {
182
- return await syncHub();
183
- } catch (hubError) {
184
- if (__DEV__) {
185
- loggerUtil.debug('Hub sync after sign-in failed (non-fatal)', LOG_CONTEXT, hubError);
186
- }
187
- return false;
188
- }
189
- }
@@ -158,10 +158,9 @@ export interface OxyContextProviderProps {
158
158
  authWebUrl?: string;
159
159
  authRedirectUri?: string;
160
160
  /**
161
- * Authorize endpoint override for silent cross-origin session restore
162
- * (web cross-app SSO). Defaults to the production Oxy IdP when unset; a
163
- * local/staging deployment points it at its own IdP so cold boot never
164
- * bounces the tab to production `auth.oxy.so`.
161
+ * Authorize endpoint override for web "Sign in with Oxy". Defaults to the
162
+ * production Oxy IdP when unset; a local/staging deployment points it at its
163
+ * own IdP so sign-in never reaches production `auth.oxy.so`.
165
164
  */
166
165
  authorizeBaseUrl?: string;
167
166
  storageKeyPrefix?: string;
@@ -174,11 +173,9 @@ export interface OxyContextProviderProps {
174
173
  sessionMode?: SessionMode;
175
174
  /**
176
175
  * Transport for WEB third-party sign-in. See `OxyProviderProps.webAuthMode`.
177
- * @default 'redirect'
176
+ * @default 'popup'
178
177
  */
179
178
  webAuthMode?: WebAuthMode;
180
- /** Sync device credentials to auth.oxy.so after interactive sign-in. @default true */
181
- hubSync?: boolean;
182
179
  onAuthStateChange?: (user: User | null) => void;
183
180
  onError?: (error: ApiError) => void;
184
181
  }
@@ -22,7 +22,7 @@ interface UseOxyAccountGraphParams {
22
22
  oxyServices: OxyServices;
23
23
  sessionClient: SessionClient;
24
24
  syncFromClient: () => Promise<void>;
25
- commitSession: (input: CommitInput, options: { activate: boolean; hubSync?: boolean }) => Promise<void>;
25
+ commitSession: (input: CommitInput, options: { activate: boolean }) => Promise<void>;
26
26
  queryClient: QueryClient;
27
27
  accountDialogControllerRef: RefObject<AccountDialogController | null>;
28
28
  clearSessionStateRef: RefObject<() => Promise<void>>;
@@ -110,9 +110,9 @@ export function useOxyAccountGraph({
110
110
  userId: result.user.id,
111
111
  user: result.user,
112
112
  },
113
- // A switch is IN-PLACE: never run the cross-origin hub-sync full-page
114
- // redirect. Cross-tab/app propagation rides the `session_state` socket.
115
- { activate: true, hubSync: false },
113
+ // A switch is IN-PLACE. Cross-tab/app propagation rides the
114
+ // `session_state` socket.
115
+ { activate: true },
116
116
  );
117
117
  await runPostAccountSwitchSideEffects();
118
118
  },