@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
@@ -8,15 +8,9 @@ import {
8
8
  } from '@oxyhq/core';
9
9
  import type { SessionClient } from '@oxyhq/core';
10
10
  import { loadPersistedDeviceCredential } from '../utils/deviceCredential';
11
- import {
12
- consumeSilentOAuthError,
13
- isSilentRestoreEligibleOrigin,
14
- maybeStartSilentOAuthRestore,
15
- } from '../utils/crossOriginRestore';
16
- import { tryCompleteOAuthReturn, consumeHubSyncFailure } from '../utils/oauthReturn';
11
+ import { tryCompleteOAuthReturn } from '../utils/oauthReturn';
17
12
  import { isWebBrowser } from '../utils/isWebBrowser';
18
- import { allowsAutomaticIdpRedirect } from '../oauth/legacyRedirectLanes';
19
- import type { WebAuthMode } from '../oauth/types';
13
+ import { isNetConnectivityExplicitlyOffline } from '../utils/netConnectivity';
20
14
  import type { CommitInput } from '../context/oxyContextTypes';
21
15
 
22
16
  /** How long the cold boot waits for the post-boot SessionClient handoff (ms). */
@@ -67,8 +61,8 @@ async function detectOfflineHint(): Promise<boolean> {
67
61
  }),
68
62
  ]);
69
63
  // `null` ⇒ the probe timed out (unknown → assume online). Only an explicit
70
- // `isConnected === false` disables the network steps.
71
- return state?.isConnected === false;
64
+ // disconnected / unreachable verdict disables the network steps.
65
+ return isNetConnectivityExplicitlyOffline(state);
72
66
  } catch {
73
67
  // NetInfo missing / probe threw — never block sign-in on a probe failure.
74
68
  return false;
@@ -80,39 +74,19 @@ export interface RunProviderColdBootOptions {
80
74
  authStore: AuthStateStore;
81
75
  clientId?: string;
82
76
  authRedirectUri?: string;
83
- /**
84
- * Authorize endpoint override for silent cross-origin restore. Defaults to
85
- * the production Oxy IdP when unset; a local/staging deployment sets it so the
86
- * silent-restore redirect targets its own IdP, never production.
87
- */
88
- authorizeBaseUrl?: string;
89
77
  /**
90
78
  * Who owns the session this boot resolves. `'account'` (the default) is the
91
79
  * device's active account — every ordinary Oxy app. `'identity'` binds the
92
80
  * boot to the owner of this device's PRIMARY identity key and REQUIRES
93
- * {@link identity}; it also disables the two web OAuth lanes below, which
94
- * commit whatever account the IdP hands back.
81
+ * {@link identity}; it also disables the web OAuth return leg below, which
82
+ * commits whatever account the IdP hands back.
95
83
  */
96
84
  sessionMode?: SessionMode;
97
85
  /** The identity binding required by `sessionMode: 'identity'`. */
98
86
  identity?: IdentityBinding;
99
- /**
100
- * How this provider's WEB sign-in reaches the IdP
101
- * (`OxyProviderProps.webAuthMode`).
102
- *
103
- * A first-class INPUT to the boot, not a UI-only concern: `'popup'` forbids
104
- * the automatic full-page `prompt=none` restore in step 3, so a domain with no
105
- * local credential resolves SIGNED OUT instead of bouncing the top-level
106
- * window to `auth.oxy.so`. See `allowsAutomaticIdpRedirect`.
107
- * @default 'redirect'
108
- */
109
- webAuthMode?: WebAuthMode;
110
87
  sessionClient: SessionClient;
111
88
  syncDeviceCredentialToHost: () => Promise<void>;
112
- commitSession: (
113
- input: CommitInput,
114
- options: { activate: boolean; hubSync?: boolean },
115
- ) => Promise<void>;
89
+ commitSession: (input: CommitInput, options: { activate: boolean }) => Promise<void>;
116
90
  markAuthResolved: () => void;
117
91
  setTokenReady: (ready: boolean) => void;
118
92
  }
@@ -121,19 +95,19 @@ export interface RunProviderColdBootOptions {
121
95
  * Device-first cold boot for `@oxyhq/services` providers.
122
96
  *
123
97
  * Ordered pipeline:
124
- * 1. Complete OAuth authorization-code return (web)
98
+ * 1. Complete an OAuth authorization-code return already on the URL (web)
125
99
  * 2. `runSessionColdBoot` — device-secret mint (+ native shared-key, or the
126
100
  * primary-identity-key lane in `sessionMode: 'identity'`)
127
- * 3. Silent OAuth for all web apps when mint finds no session
128
101
  *
129
- * Steps 1 and 3 are ACCOUNT-MODE ONLY: both commit whichever account the IdP
130
- * resolves, which for an identity-bound client is somebody else's account by
131
- * construction. In `'identity'` mode the boot is exactly step 2.
102
+ * Step 1 is ACCOUNT-MODE ONLY: it commits whichever account the IdP resolves,
103
+ * which for an identity-bound client is somebody else's account by construction.
104
+ * In `'identity'` mode the boot is exactly step 2.
132
105
  *
133
- * Step 3 is additionally REDIRECT-MODE ONLY: it navigates the top-level window
134
- * with no user gesture behind it, which `webAuthMode: 'popup'` exists to
135
- * eliminate. In popup mode the boot is steps 1 and 2, and a domain with no local
136
- * credential simply resolves signed out. See `allowsAutomaticIdpRedirect`.
106
+ * The boot NEVER navigates the top-level window. There is no automatic
107
+ * `prompt=none` bounce to the IdP: a web origin with no local device credential
108
+ * resolves SIGNED OUT and waits for the user's next explicit "Continue with
109
+ * Oxy", which opens a popup from a real gesture (#691 phase 7b). Step 1 is not a
110
+ * navigation — it only consumes a code that is already in the address bar.
137
111
  */
138
112
  export async function runProviderColdBoot(opts: RunProviderColdBootOptions): Promise<void> {
139
113
  const {
@@ -141,10 +115,8 @@ export async function runProviderColdBoot(opts: RunProviderColdBootOptions): Pro
141
115
  authStore,
142
116
  clientId,
143
117
  authRedirectUri,
144
- authorizeBaseUrl,
145
118
  sessionMode = 'account',
146
119
  identity,
147
- webAuthMode = 'redirect',
148
120
  sessionClient,
149
121
  syncDeviceCredentialToHost,
150
122
  commitSession,
@@ -157,28 +129,19 @@ export async function runProviderColdBoot(opts: RunProviderColdBootOptions): Pro
157
129
  setTokenReady(false);
158
130
 
159
131
  try {
160
- // MODE-INDEPENDENT URL cleanup, deliberately so: both consume query params a
161
- // PREVIOUS redirect-mode session left in the address bar (`?error=login_required`
162
- // from a silent authorize, `?hub_sync=failed` from the hub) and restore the
163
- // page the visit started on. Flipping an app to popup mode must not strand
164
- // those params, so neither is gated on `webAuthMode`. Neither starts a
165
- // navigation they only rewrite the URL via `history.replaceState`.
166
- consumeSilentOAuthError();
167
- consumeHubSyncFailure();
168
-
169
- // The redirect transport's RETURN leg — also NOT gated on `webAuthMode`. A
170
- // popup-mode app legitimately lands here with `?code=` whenever the browser
171
- // blocked the popup and `startWebOAuthSignIn` fell back to a full-page
172
- // redirect (`popup-blocked` / `popup-navigation-failed`), and an app that
173
- // switched modes mid-flight must not be stranded with a dead `?code=`
174
- // either. It consumes a code already on the URL; it never starts one.
132
+ // The redirect transport's RETURN leg. An app reaches it whenever the browser
133
+ // BLOCKED the sign-in popup and `startWebOAuthSignIn` fell back to a
134
+ // full-page redirect (`popup-blocked` / `popup-navigation-failed`), so it is
135
+ // load-bearing even though nothing here ever starts a redirect. It consumes a
136
+ // code (or a stale OAuth `error`) already in the address bar and rewrites the
137
+ // URL via `history.replaceState`; it never begins a navigation.
175
138
  const oauthCompleted = identityBound
176
139
  ? false
177
140
  : await tryCompleteOAuthReturn({
178
141
  oxyServices,
179
142
  clientId,
180
143
  authRedirectUri,
181
- commitSession: (input) => commitSession(input, { activate: true, hubSync: false }),
144
+ commitSession: (input) => commitSession(input, { activate: true }),
182
145
  });
183
146
  if (oauthCompleted) {
184
147
  setTokenReady(true);
@@ -192,7 +155,7 @@ export async function runProviderColdBoot(opts: RunProviderColdBootOptions): Pro
192
155
  // resolves to "online" — the network steps still run.
193
156
  const offline = await detectOfflineHint();
194
157
 
195
- const outcome = await runSessionColdBoot({
158
+ await runSessionColdBoot({
196
159
  oxy: oxyServices,
197
160
  store: authStore,
198
161
  platform: { isWeb: isWebBrowser(), isNative: !isWebBrowser() },
@@ -259,46 +222,6 @@ export async function runProviderColdBoot(opts: RunProviderColdBootOptions): Pro
259
222
  }
260
223
  },
261
224
  });
262
-
263
- // Silent cross-origin OAuth restore (web cross-app SSO): a full-page
264
- // `prompt=none` bounce to the IdP when the mint found no local session.
265
- //
266
- // TRANSPORT gate (`allowsAutomaticIdpRedirect`): `webAuthMode: 'popup'`
267
- // FORBIDS this lane. It navigates the top-level window with no user gesture
268
- // behind it, which is precisely what popup mode exists to eliminate — a
269
- // popup-mode domain without a local credential resolves signed out right
270
- // here and waits for the user's next explicit "Continue with Oxy" (issue
271
- // #691, "Cold boot and cross-domain behavior"). `'redirect'` — still the
272
- // default and the compatibility path — reaches this lane unchanged, and this
273
- // whole block disappears with the transport in phase 7b.
274
- //
275
- // ORIGIN gate: same as the hub-sync WRITE side (`syncHubAfterSignIn`) —
276
- // official web origins only, never the IdP hub itself, and — unlike the
277
- // write side — never a loopback / local-dev origin (which must not be
278
- // bounced to a hosted IdP on cold boot). The authorize endpoint is
279
- // env-configurable so a local/staging app targets its own IdP instead of
280
- // production.
281
- const webOrigin = isWebBrowser()
282
- ? (globalThis as { location?: Location }).location?.origin
283
- : undefined;
284
- if (
285
- !identityBound &&
286
- allowsAutomaticIdpRedirect(webAuthMode) &&
287
- clientId &&
288
- outcome.kind !== 'session' &&
289
- webOrigin &&
290
- isSilentRestoreEligibleOrigin(webOrigin)
291
- ) {
292
- const redirected = await maybeStartSilentOAuthRestore({
293
- oxyServices,
294
- clientId,
295
- redirectUri: authRedirectUri,
296
- authorizeBaseUrl,
297
- });
298
- if (redirected) {
299
- return;
300
- }
301
- }
302
225
  } catch (error) {
303
226
  if (__DEV__) {
304
227
  loggerUtil.error(
@@ -1,6 +1,6 @@
1
1
  import type React from 'react';
2
2
  import { View, type ViewStyle } from 'react-native';
3
- import { Ionicons } from '@expo/vector-icons';
3
+ import Ionicons from '@expo/vector-icons/Ionicons';
4
4
  import { useTheme } from '@oxyhq/bloom/theme';
5
5
 
6
6
  /**
@@ -20,9 +20,11 @@
20
20
  * auto-starts the instant the view is reached, because the request surface
21
21
  * (a QR on an unknown desktop, "Check Commons on your phone" where Oxy could
22
22
  * deliver) IS the primary route there, never something behind a second tap.
23
- * - `qr` → `SignInRequestView` — the ACTIVE REQUEST: the route Oxy chose plus
24
- * honest progress derived only from `snapshot.signIn`. Alternatives stay
25
- * behind "Having trouble?" until the chosen route reports `routeFailed`.
23
+ * - `qr` → `SignInRequestView` — the ACTIVE REQUEST: the controller-bound
24
+ * wiring over the shared, presentational `OxySignInRequestSurface` (the same
25
+ * component the auth.oxy.so IdP mounts from its OAuth-bound request). It maps
26
+ * `snapshot.signIn` onto that surface's props; alternatives stay behind
27
+ * "Having trouble?" until the chosen route reports `routeFailed`.
26
28
  * - `signup` → `SignUpView` — account creation, Commons-first.
27
29
  *
28
30
  * Per-account color re-theming uses Bloom's `APP_COLOR_PRESETS` + `BloomColorScope`
@@ -376,7 +378,6 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({
376
378
  return (
377
379
  <SignInRequestView
378
380
  snapshot={snapshot}
379
- theme={theme}
380
381
  t={t}
381
382
  onRetry={() => void controller.showQr()}
382
383
  alternatives={alternatives}
@@ -12,6 +12,7 @@ import { logger as loggerUtil } from '@oxyhq/core';
12
12
  import { RequireOxyAuth } from './RequireOxyAuth';
13
13
  import { attachQueryPersistence, createQueryClient } from '../hooks/queryClient';
14
14
  import { createPlatformStorage, type StorageInterface } from '../utils/storageHelpers';
15
+ import { isNetConnectivityOnline } from '../utils/netConnectivity';
15
16
 
16
17
  /**
17
18
  * Background color shown for the brief window between mount and the
@@ -92,10 +93,9 @@ const OxyProvider: FC<OxyProviderProps> = ({
92
93
  authRedirectUri,
93
94
  authorizeBaseUrl,
94
95
  sessionMode = 'account',
95
- webAuthMode = 'redirect',
96
+ webAuthMode = 'popup',
96
97
  queryClient: providedQueryClient,
97
98
  requireAuth = 'off',
98
- hubSync = true,
99
99
  }) => {
100
100
 
101
101
  // Dynamic KeyboardProvider for native. Uses variable indirection
@@ -230,10 +230,10 @@ const OxyProvider: FC<OxyProviderProps> = ({
230
230
  try {
231
231
  const NetInfo = await import('@react-native-community/netinfo');
232
232
  const state = await NetInfo.default.fetch();
233
- onlineManager.setOnline(state.isConnected ?? true);
233
+ onlineManager.setOnline(isNetConnectivityOnline(state));
234
234
 
235
- const unsubscribe = NetInfo.default.addEventListener((state: { isConnected: boolean | null }) => {
236
- onlineManager.setOnline(state.isConnected ?? true);
235
+ const unsubscribe = NetInfo.default.addEventListener((state: { isConnected: boolean | null; isInternetReachable?: boolean | null }) => {
236
+ onlineManager.setOnline(isNetConnectivityOnline(state));
237
237
  });
238
238
 
239
239
  cleanup = () => unsubscribe();
@@ -293,7 +293,6 @@ const OxyProvider: FC<OxyProviderProps> = ({
293
293
  clientId={clientId}
294
294
  sessionMode={sessionMode}
295
295
  webAuthMode={webAuthMode}
296
- hubSync={hubSync}
297
296
  onAuthStateChange={onAuthStateChange as OxyContextProviderProps['onAuthStateChange']}
298
297
  >
299
298
  <SurfaceProvider>
@@ -0,0 +1,202 @@
1
+ /**
2
+ * `OxySignInRequestSurface` — the in-flight "Sign in with Oxy" request, rendered
3
+ * from plain facts (issue #691, Phase 5).
4
+ *
5
+ * The user already performed their one action. From here the surface only
6
+ * REPORTS: the route-appropriate primary visual, the status line for the
7
+ * progress it was told about, and nothing else at the same weight. Alternatives
8
+ * stay behind "Having trouble?" until the chosen route could not be carried out,
9
+ * at which point they ARE the content and render plainly.
10
+ *
11
+ * PRESENTATIONAL AND HEADLESS-FRIENDLY. It owns no request, no controller, no
12
+ * polling, and no state of its own: everything it draws is a prop. That is what
13
+ * lets the two hosts of this surface share ONE implementation —
14
+ *
15
+ * - `OxyAuthChooser`'s `SignInRequestView`, driven by `AccountDialogController`'s
16
+ * device flow;
17
+ * - the auth.oxy.so IdP's OAuth-bound lane, whose request carries an OAuth
18
+ * binding the account dialog's session has no concept of.
19
+ *
20
+ * It resolves only what every `@oxyhq/services` consumer already has in context:
21
+ * the Bloom theme (`useTheme`) and the SDK's own locale dictionary (`useI18n`,
22
+ * the `accountSwitcher.*` copy in all 11 locales). Host-specific copy — the
23
+ * labels on {@link OxySignInRequestSurfaceProps.subordinate} and
24
+ * {@link OxySignInRequestSurfaceProps.alternatives} — arrives already localized.
25
+ *
26
+ * TWO THINGS IT DELIBERATELY DOES NOT DO:
27
+ * - it renders no failure REASON. A host surfaces that the way its own shell
28
+ * demands (the account dialog toasts it — errors never render inline there;
29
+ * a full page may show a banner around this surface). The surface only takes
30
+ * the fact that the request failed, and offers the way forward.
31
+ * - it derives nothing from {@link OxySignInRequestSurfaceProps.qrPayload}.
32
+ * Application identity, origin, and scopes are resolved server-side by the
33
+ * approver (Commons), never read out of a payload here — the plate encodes it
34
+ * and shows nothing about it.
35
+ *
36
+ * SECRETS: every prop is safe to render. There is no `sessionToken` (the secret
37
+ * claim/finalize credential), no bearer, and no authorization code — a host
38
+ * keeps those in its own controller, and no prop on this component invites one.
39
+ */
40
+
41
+ import type React from 'react';
42
+ import { View } from 'react-native';
43
+ import { Button } from '@oxyhq/bloom/button';
44
+ import { useTheme } from '@oxyhq/bloom/theme';
45
+ import { Text } from '@oxyhq/bloom/typography';
46
+ import type { CommonsDeliveryRoute, SignInProgress } from '@oxyhq/core';
47
+ import { useI18n } from '../hooks/useI18n';
48
+ import TroubleDisclosure from './authChooser/TroubleDisclosure';
49
+ import { SubtleLink } from './authChooser/primitives';
50
+ import { GetCommonsPrompt, RequestPrimarySurface } from './authChooser/requestSurfaces';
51
+ import { signInProgressLabel } from './authChooser/signInProgress';
52
+ import { authChooserStyles as styles } from './authChooser/styles';
53
+ import type { OxySignInSurfaceAction } from './authChooser/types';
54
+
55
+ /** Shared empty list, so an omitted action bundle allocates nothing per render. */
56
+ const NO_ACTIONS: readonly OxySignInSurfaceAction[] = [];
57
+
58
+ export interface OxySignInRequestSurfaceProps {
59
+ /**
60
+ * The ONE primary delivery route chosen for this request, or `null` while it
61
+ * is still being resolved. There is no chain: the surface renders exactly one
62
+ * route's visual, and never guesses one that has not been chosen yet.
63
+ */
64
+ route: CommonsDeliveryRoute | null;
65
+ /**
66
+ * The request's DERIVED progress — the only thing the status line is built
67
+ * from. It must come from a real observed signal (a server-reported delivery,
68
+ * an approver opening the request, an approval); the surface owns no clock and
69
+ * will never advance it on its own. `'idle'` means there is nothing honest to
70
+ * report, and renders no status line.
71
+ */
72
+ progress: SignInProgress;
73
+ /**
74
+ * The PUBLIC `oxycommons://approve?…` payload to encode as the QR, or `null`.
75
+ * It carries the single-use approval handle — never a secret credential — and
76
+ * the surface renders NOTHING derived from it.
77
+ */
78
+ qrPayload?: string | null;
79
+ /**
80
+ * `true` when the chosen primary route could not be carried out on this device.
81
+ * The one signal that reveals {@link alternatives} without the user asking;
82
+ * a host never silently cascades to another route on its own.
83
+ */
84
+ routeFailed?: boolean;
85
+ /**
86
+ * `true` when the request itself is terminally failed — there is no working
87
+ * primary route left to report on, so {@link onRetry} becomes the surface's one
88
+ * primary action and the alternatives render plainly.
89
+ */
90
+ failed?: boolean;
91
+ /**
92
+ * Start a BRAND-NEW request. Rendered as the primary action while
93
+ * {@link failed}; omit it when a fresh attempt cannot help (a request that
94
+ * would fail identically every time), leaving the alternatives as the only
95
+ * way forward.
96
+ */
97
+ onRetry?: () => void;
98
+ /**
99
+ * The acquisition action for a device where Commons is known to be ABSENT.
100
+ *
101
+ * Pass it ONLY on a positive "not installed" verdict. There, acquiring Commons
102
+ * is the GENUINE primary route — a same-device QR the user would have to scan
103
+ * with the very screen showing it is a dead end — so the surface leads with it
104
+ * and reports no route progress. Omit it wherever absence cannot be known (a
105
+ * browser cannot ask whether a URL scheme is registered).
106
+ */
107
+ onAcquireCommons?: () => void;
108
+ /**
109
+ * Subordinate links rendered directly beneath the primary, always visible:
110
+ * the ways OUT of the surface that are not troubleshooting (creating an
111
+ * account, cancelling the request).
112
+ */
113
+ subordinate?: readonly OxySignInSurfaceAction[];
114
+ /**
115
+ * The alternative ways to authenticate, kept behind "Having trouble?" until
116
+ * the user asks — or shown plainly once {@link failed} / {@link routeFailed}
117
+ * says the chosen route cannot deliver.
118
+ */
119
+ alternatives?: readonly OxySignInSurfaceAction[];
120
+ }
121
+
122
+ export const OxySignInRequestSurface: React.FC<OxySignInRequestSurfaceProps> = ({
123
+ route,
124
+ progress,
125
+ qrPayload = null,
126
+ routeFailed = false,
127
+ failed = false,
128
+ onRetry,
129
+ onAcquireCommons,
130
+ subordinate = NO_ACTIONS,
131
+ alternatives = NO_ACTIONS,
132
+ }) => {
133
+ const theme = useTheme();
134
+ const { t } = useI18n();
135
+
136
+ const subordinateLinks = subordinate.map((action) => (
137
+ <SubtleLink
138
+ key={action.key}
139
+ label={action.label}
140
+ theme={theme}
141
+ onPress={action.onPress}
142
+ disabled={action.disabled}
143
+ testID={action.key}
144
+ />
145
+ ));
146
+
147
+ // A failed request has no working primary route left. Its REASON is the host's
148
+ // to surface (toast / banner); all this owes the user is the way forward.
149
+ if (failed) {
150
+ return (
151
+ <View style={styles.centeredBlock}>
152
+ {onRetry ? (
153
+ <Button variant="primary" onPress={onRetry} style={styles.primaryButton}>
154
+ {t('common.actions.tryAgain')}
155
+ </Button>
156
+ ) : null}
157
+ {subordinateLinks}
158
+ <TroubleDisclosure actions={alternatives} revealed theme={theme} t={t} />
159
+ </View>
160
+ );
161
+ }
162
+
163
+ // Commons is absent: acquiring it IS the primary route, not a fallback, so it
164
+ // renders as the one primary action and no route progress is reported (there is
165
+ // no route to report on until the host says otherwise).
166
+ if (onAcquireCommons) {
167
+ return (
168
+ <View style={styles.centeredBlock}>
169
+ <GetCommonsPrompt theme={theme} t={t} onGetCommons={onAcquireCommons} />
170
+ {subordinateLinks}
171
+ <TroubleDisclosure actions={alternatives} revealed={false} theme={theme} t={t} />
172
+ </View>
173
+ );
174
+ }
175
+
176
+ const status = signInProgressLabel(progress, route, t);
177
+
178
+ return (
179
+ <View style={styles.centeredBlock}>
180
+ <RequestPrimarySurface
181
+ route={route}
182
+ progress={progress}
183
+ qrPayload={qrPayload}
184
+ theme={theme}
185
+ t={t}
186
+ />
187
+ {status ? (
188
+ <Text
189
+ style={[styles.mutedText, { color: theme.colors.textSecondary }]}
190
+ accessibilityLiveRegion="polite"
191
+ testID="signin-progress"
192
+ >
193
+ {status}
194
+ </Text>
195
+ ) : null}
196
+ {subordinateLinks}
197
+ <TroubleDisclosure actions={alternatives} revealed={routeFailed} theme={theme} t={t} />
198
+ </View>
199
+ );
200
+ };
201
+
202
+ export default OxySignInRequestSurface;
@@ -8,7 +8,7 @@ import {
8
8
  type StyleProp,
9
9
  type ViewStyle,
10
10
  } from 'react-native';
11
- import { MaterialCommunityIcons } from '@expo/vector-icons';
11
+ import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
12
12
  import { Avatar } from '@oxyhq/bloom/avatar';
13
13
  import * as Skeleton from '@oxyhq/bloom/skeleton';
14
14
  import { Text } from '@oxyhq/bloom/typography';
@@ -1,7 +1,7 @@
1
1
  import type React from 'react';
2
2
  import { memo } from 'react';
3
3
  import { View, StyleSheet } from 'react-native';
4
- import { MaterialCommunityIcons } from '@expo/vector-icons';
4
+ import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
5
5
  import { darkenColor } from '../utils/colorUtils';
6
6
 
7
7
  interface SettingsIconProps {
@@ -33,7 +33,7 @@ import Animated, {
33
33
  useSharedValue,
34
34
  withTiming,
35
35
  } from 'react-native-reanimated';
36
- import { MaterialCommunityIcons } from '@expo/vector-icons';
36
+ import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
37
37
  import { Avatar } from '@oxyhq/bloom/avatar';
38
38
  import { AvatarGroup, type AvatarGroupItem } from '@oxyhq/bloom/avatar-group';
39
39
  import { Button } from '@oxyhq/bloom/button';
@@ -20,10 +20,16 @@ import type React from 'react';
20
20
  import { View } from 'react-native';
21
21
  import { Button } from '@oxyhq/bloom/button';
22
22
  import type { AccountDialogSnapshot } from '@oxyhq/core';
23
- import TroubleDisclosure, { type TroubleAction } from './TroubleDisclosure';
23
+ import TroubleDisclosure from './TroubleDisclosure';
24
24
  import { AccountRow, Dividerish, SubtleLink } from './primitives';
25
25
  import { authChooserStyles as styles } from './styles';
26
- import type { OxyAuthChooserHandlers, SignInAlternatives, Theme, Translate } from './types';
26
+ import type {
27
+ OxyAuthChooserHandlers,
28
+ OxySignInSurfaceAction,
29
+ SignInAlternatives,
30
+ Theme,
31
+ Translate,
32
+ } from './types';
27
33
 
28
34
  interface SignInEntryViewProps {
29
35
  snapshot: AccountDialogSnapshot;
@@ -45,7 +51,7 @@ const SignInEntryView: React.FC<SignInEntryViewProps> = ({
45
51
  }) => {
46
52
  // The entry has no chosen route yet, so nothing here can have failed: the
47
53
  // alternatives stay behind the disclosure unconditionally.
48
- const troubleActions: TroubleAction[] = [
54
+ const troubleActions: OxySignInSurfaceAction[] = [
49
55
  {
50
56
  key: 'scan-qr-link',
51
57
  label: t('accountSwitcher.scanQr'),