@oxyhq/services 26.0.1 → 26.0.4

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 (599) hide show
  1. package/README.md +2 -2
  2. package/android/src/main/java/so/oxy/identity/OxyIdentityStore.kt +21 -127
  3. package/android/src/main/java/so/oxy/session/OxyBackgroundSession.kt +184 -0
  4. package/android/src/main/java/so/oxy/session/OxyBackgroundSessionApi.kt +162 -0
  5. package/android/src/main/java/so/oxy/session/OxyBackgroundSessionModule.kt +116 -0
  6. package/android/src/main/java/so/oxy/session/OxyBackgroundSessionStore.kt +179 -0
  7. package/android/src/main/java/so/oxy/session/OxyBackgroundToken.kt +61 -0
  8. package/android/src/main/java/so/oxy/storage/OxyEncryptedPrefs.kt +241 -0
  9. package/expo-module.config.json +4 -1
  10. package/lib/commonjs/index.js +18 -49
  11. package/lib/commonjs/index.js.map +1 -1
  12. package/lib/commonjs/notifications/deviceNotifications.js +63 -0
  13. package/lib/commonjs/notifications/deviceNotifications.js.map +1 -1
  14. package/lib/commonjs/ui/boot/runProviderColdBoot.js +20 -64
  15. package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
  16. package/lib/commonjs/ui/components/AvatarCameraBadge.js +2 -2
  17. package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -1
  18. package/lib/commonjs/ui/components/FollowButton.js +4 -4
  19. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  20. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +13 -1
  21. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
  22. package/lib/commonjs/ui/components/OxyAuthChooser.js +29 -24
  23. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  24. package/lib/commonjs/ui/components/OxyProvider.js +8 -7
  25. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  26. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  27. package/lib/commonjs/ui/components/ProfileButton.js +20 -26
  28. package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
  29. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +68 -58
  30. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  31. package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
  32. package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js +2 -2
  33. package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js.map +1 -1
  34. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +2 -2
  35. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
  36. package/lib/commonjs/ui/components/internal/PinInput.js +3 -1
  37. package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
  38. package/lib/commonjs/ui/components/logo/LogoText.js +4 -4
  39. package/lib/commonjs/ui/components/logo/LogoText.js.map +1 -1
  40. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +2 -2
  41. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  42. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +2 -2
  43. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
  44. package/lib/commonjs/ui/components/styles/shadow.js.map +1 -1
  45. package/lib/commonjs/ui/context/OxyContext.js +32 -46
  46. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  47. package/lib/commonjs/ui/context/commitSessionFlow.js +3 -43
  48. package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
  49. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +15 -2
  50. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  51. package/lib/commonjs/ui/context/useOxyAccountGraph.js +3 -4
  52. package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
  53. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +5 -5
  54. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -1
  55. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +11 -11
  56. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  57. package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +9 -9
  58. package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
  59. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +3 -2
  60. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  61. package/lib/commonjs/ui/hooks/queries/userCache.js +17 -17
  62. package/lib/commonjs/ui/hooks/queries/userCache.js.map +1 -1
  63. package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
  64. package/lib/commonjs/ui/hooks/useAsyncAction.js +7 -7
  65. package/lib/commonjs/ui/hooks/useAsyncAction.js.map +1 -1
  66. package/lib/commonjs/ui/hooks/useAuth.js +8 -4
  67. package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
  68. package/lib/commonjs/ui/hooks/useAvatarPicker.js +5 -5
  69. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
  70. package/lib/commonjs/ui/hooks/useOnlineStatus.js +3 -2
  71. package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -1
  72. package/lib/commonjs/ui/hooks/useSessionManagement.js +0 -2
  73. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  74. package/lib/commonjs/ui/hooks/useSettingToggle.js +4 -4
  75. package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -1
  76. package/lib/commonjs/ui/hooks/useSurfaceHeader.js +68 -11
  77. package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -1
  78. package/lib/commonjs/ui/navigation/accountDialogManager.js +2 -0
  79. package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
  80. package/lib/commonjs/ui/oauth/browserAuthTransport.js +66 -64
  81. package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -1
  82. package/lib/commonjs/ui/oauth/oauthPopup.js +47 -0
  83. package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -1
  84. package/lib/commonjs/ui/screens/AccountMembersScreen.js +10 -10
  85. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  86. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +41 -19
  87. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  88. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +4 -4
  89. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  90. package/lib/commonjs/ui/screens/AppInfoScreen.js +9 -9
  91. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  92. package/lib/commonjs/ui/screens/AvatarCropScreen.js +3 -3
  93. package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
  94. package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +6 -7
  95. package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -1
  96. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +4 -4
  97. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
  98. package/lib/commonjs/ui/screens/CreateAccountScreen.js +46 -14
  99. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  100. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +5 -5
  101. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  102. package/lib/commonjs/ui/screens/EditProfileScreen.js +2 -3
  103. package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
  104. package/lib/commonjs/ui/screens/FAQScreen.js +2 -2
  105. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  106. package/lib/commonjs/ui/screens/FeedbackScreen.js +90 -89
  107. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  108. package/lib/commonjs/ui/screens/FileManagementScreen.js +20 -20
  109. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  110. package/lib/commonjs/ui/screens/FollowersListScreen.js.map +1 -1
  111. package/lib/commonjs/ui/screens/FollowingListScreen.js.map +1 -1
  112. package/lib/commonjs/ui/screens/HelpSupportScreen.js +7 -7
  113. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  114. package/lib/commonjs/ui/screens/HistoryViewScreen.js +9 -34
  115. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  116. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +3 -3
  117. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  118. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +3 -3
  119. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  120. package/lib/commonjs/ui/screens/ManageAccountScreen.js +15 -15
  121. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  122. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +19 -19
  123. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  124. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +15 -15
  125. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  126. package/lib/commonjs/ui/screens/ProfileScreen.js +17 -7
  127. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  128. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +2 -2
  129. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  130. package/lib/commonjs/ui/screens/UserListScreen.js +13 -7
  131. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  132. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +5 -6
  133. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  134. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +1 -4
  135. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  136. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +34 -24
  137. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  138. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +1 -1
  139. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  140. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +3 -4
  141. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  142. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +1 -1
  143. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  144. package/lib/commonjs/ui/session/backgroundSession.js +258 -0
  145. package/lib/commonjs/ui/session/backgroundSession.js.map +1 -0
  146. package/lib/commonjs/ui/session/index.js +7 -0
  147. package/lib/commonjs/ui/session/index.js.map +1 -1
  148. package/lib/commonjs/ui/session/useBackgroundSessionSync.js +81 -0
  149. package/lib/commonjs/ui/session/useBackgroundSessionSync.js.map +1 -0
  150. package/lib/commonjs/ui/utils/fileManagement.js +24 -24
  151. package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
  152. package/lib/commonjs/ui/utils/netConnectivity.js +28 -0
  153. package/lib/commonjs/ui/utils/netConnectivity.js.map +1 -0
  154. package/lib/commonjs/ui/utils/oauthReturn.js +19 -30
  155. package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
  156. package/lib/commonjs/ui/utils/userUtils.js +27 -28
  157. package/lib/commonjs/ui/utils/userUtils.js.map +1 -1
  158. package/lib/module/index.js +20 -8
  159. package/lib/module/index.js.map +1 -1
  160. package/lib/module/notifications/deviceNotifications.js +62 -0
  161. package/lib/module/notifications/deviceNotifications.js.map +1 -1
  162. package/lib/module/ui/boot/runProviderColdBoot.js +21 -65
  163. package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
  164. package/lib/module/ui/components/AvatarCameraBadge.js +1 -1
  165. package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -1
  166. package/lib/module/ui/components/FollowButton.js +1 -1
  167. package/lib/module/ui/components/FollowButton.js.map +1 -1
  168. package/lib/module/ui/components/OxyAccountDialogScreen.js +13 -1
  169. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
  170. package/lib/module/ui/components/OxyAuthChooser.js +25 -20
  171. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  172. package/lib/module/ui/components/OxyProvider.js +7 -6
  173. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  174. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  175. package/lib/module/ui/components/ProfileButton.js +12 -18
  176. package/lib/module/ui/components/ProfileButton.js.map +1 -1
  177. package/lib/module/ui/components/authChooser/AccountsMenuView.js +68 -58
  178. package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  179. package/lib/module/ui/components/authChooser/types.js.map +1 -1
  180. package/lib/module/ui/components/authChooser/useUsernameAvailability.js +1 -1
  181. package/lib/module/ui/components/authChooser/useUsernameAvailability.js.map +1 -1
  182. package/lib/module/ui/components/fileManagement/UploadPreview.js +1 -1
  183. package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
  184. package/lib/module/ui/components/internal/PinInput.js +3 -1
  185. package/lib/module/ui/components/internal/PinInput.js.map +1 -1
  186. package/lib/module/ui/components/logo/LogoText.js +4 -4
  187. package/lib/module/ui/components/logo/LogoText.js.map +1 -1
  188. package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
  189. package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  190. package/lib/module/ui/components/payment/PaymentSummaryStep.js +2 -2
  191. package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
  192. package/lib/module/ui/components/styles/shadow.js.map +1 -1
  193. package/lib/module/ui/context/OxyContext.js +35 -49
  194. package/lib/module/ui/context/OxyContext.js.map +1 -1
  195. package/lib/module/ui/context/commitSessionFlow.js +3 -42
  196. package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
  197. package/lib/module/ui/context/hooks/useAuthOperations.js +15 -2
  198. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  199. package/lib/module/ui/context/useOxyAccountGraph.js +3 -4
  200. package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
  201. package/lib/module/ui/hooks/mutations/mutationFactory.js +1 -1
  202. package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -1
  203. package/lib/module/ui/hooks/mutations/useAccountMutations.js +1 -1
  204. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  205. package/lib/module/ui/hooks/mutations/useServicesMutations.js +1 -1
  206. package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
  207. package/lib/module/ui/hooks/queries/usePaymentQueries.js +3 -2
  208. package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  209. package/lib/module/ui/hooks/queries/userCache.js +17 -17
  210. package/lib/module/ui/hooks/queries/userCache.js.map +1 -1
  211. package/lib/module/ui/hooks/useAssets.js.map +1 -1
  212. package/lib/module/ui/hooks/useAsyncAction.js +1 -1
  213. package/lib/module/ui/hooks/useAsyncAction.js.map +1 -1
  214. package/lib/module/ui/hooks/useAuth.js +8 -4
  215. package/lib/module/ui/hooks/useAuth.js.map +1 -1
  216. package/lib/module/ui/hooks/useAvatarPicker.js +1 -1
  217. package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
  218. package/lib/module/ui/hooks/useOnlineStatus.js +3 -2
  219. package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -1
  220. package/lib/module/ui/hooks/useSessionManagement.js +0 -2
  221. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  222. package/lib/module/ui/hooks/useSettingToggle.js +1 -1
  223. package/lib/module/ui/hooks/useSettingToggle.js.map +1 -1
  224. package/lib/module/ui/hooks/useSurfaceHeader.js +68 -11
  225. package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -1
  226. package/lib/module/ui/navigation/accountDialogManager.js +2 -0
  227. package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
  228. package/lib/module/ui/oauth/browserAuthTransport.js +66 -64
  229. package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -1
  230. package/lib/module/ui/oauth/oauthPopup.js +48 -1
  231. package/lib/module/ui/oauth/oauthPopup.js.map +1 -1
  232. package/lib/module/ui/screens/AccountMembersScreen.js +1 -1
  233. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  234. package/lib/module/ui/screens/AccountSettingsScreen.js +37 -15
  235. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  236. package/lib/module/ui/screens/AccountVerificationScreen.js +1 -1
  237. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  238. package/lib/module/ui/screens/AppInfoScreen.js +1 -1
  239. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  240. package/lib/module/ui/screens/AvatarCropScreen.js +1 -1
  241. package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
  242. package/lib/module/ui/screens/ChangeAvatarScreen.js +4 -5
  243. package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -1
  244. package/lib/module/ui/screens/ConnectedAppsScreen.js +2 -2
  245. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
  246. package/lib/module/ui/screens/CreateAccountScreen.js +45 -13
  247. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  248. package/lib/module/ui/screens/EditProfileFieldScreen.js +4 -4
  249. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  250. package/lib/module/ui/screens/EditProfileScreen.js +3 -4
  251. package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
  252. package/lib/module/ui/screens/FAQScreen.js +1 -1
  253. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  254. package/lib/module/ui/screens/FeedbackScreen.js +94 -91
  255. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  256. package/lib/module/ui/screens/FileManagementScreen.js +1 -1
  257. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  258. package/lib/module/ui/screens/FollowersListScreen.js.map +1 -1
  259. package/lib/module/ui/screens/FollowingListScreen.js.map +1 -1
  260. package/lib/module/ui/screens/HelpSupportScreen.js +1 -1
  261. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  262. package/lib/module/ui/screens/HistoryViewScreen.js +5 -30
  263. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  264. package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
  265. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  266. package/lib/module/ui/screens/LegalDocumentsScreen.js +1 -1
  267. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  268. package/lib/module/ui/screens/ManageAccountScreen.js +3 -3
  269. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  270. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +4 -4
  271. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  272. package/lib/module/ui/screens/PrivacySettingsScreen.js +11 -11
  273. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  274. package/lib/module/ui/screens/ProfileScreen.js +18 -8
  275. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  276. package/lib/module/ui/screens/SavesCollectionsScreen.js +1 -1
  277. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  278. package/lib/module/ui/screens/UserListScreen.js +14 -8
  279. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  280. package/lib/module/ui/screens/WelcomeNewUserScreen.js +5 -6
  281. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  282. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +1 -4
  283. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  284. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +15 -5
  285. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  286. package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
  287. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  288. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +4 -5
  289. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  290. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +1 -1
  291. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  292. package/lib/module/ui/session/backgroundSession.js +252 -0
  293. package/lib/module/ui/session/backgroundSession.js.map +1 -0
  294. package/lib/module/ui/session/index.js +1 -0
  295. package/lib/module/ui/session/index.js.map +1 -1
  296. package/lib/module/ui/session/useBackgroundSessionSync.js +76 -0
  297. package/lib/module/ui/session/useBackgroundSessionSync.js.map +1 -0
  298. package/lib/module/ui/utils/fileManagement.js +25 -25
  299. package/lib/module/ui/utils/fileManagement.js.map +1 -1
  300. package/lib/module/ui/utils/netConnectivity.js +23 -0
  301. package/lib/module/ui/utils/netConnectivity.js.map +1 -0
  302. package/lib/module/ui/utils/oauthReturn.js +20 -30
  303. package/lib/module/ui/utils/oauthReturn.js.map +1 -1
  304. package/lib/module/ui/utils/userUtils.js +27 -28
  305. package/lib/module/ui/utils/userUtils.js.map +1 -1
  306. package/lib/typescript/commonjs/index.d.ts +1 -2
  307. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +51 -0
  309. package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -1
  310. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +11 -30
  311. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.d.ts.map +1 -1
  313. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  314. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +7 -0
  315. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  316. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  317. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts +2 -1
  318. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
  319. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +3 -0
  320. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
  322. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +6 -0
  323. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
  324. package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts +1 -1
  325. package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
  326. package/lib/typescript/commonjs/ui/components/internal/PinInput.d.ts.map +1 -1
  327. package/lib/typescript/commonjs/ui/components/payment/types.d.ts +6 -6
  328. package/lib/typescript/commonjs/ui/components/payment/types.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  330. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +0 -40
  331. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +11 -2
  333. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  334. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +26 -7
  335. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
  336. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +0 -1
  337. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  338. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  339. package/lib/typescript/commonjs/ui/hooks/queries/paymentTypes.d.ts +3 -2
  340. package/lib/typescript/commonjs/ui/hooks/queries/paymentTypes.d.ts.map +1 -1
  341. package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts +3 -2
  342. package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
  343. package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts +2 -2
  344. package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts.map +1 -1
  345. package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
  346. package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
  347. package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts +2 -2
  348. package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts.map +1 -1
  349. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +10 -6
  350. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
  351. package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +3 -2
  352. package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -1
  353. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
  354. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +7 -2
  355. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +8 -0
  357. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
  358. package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -1
  359. package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +6 -0
  360. package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -1
  361. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  362. package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts.map +1 -1
  363. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  364. package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
  365. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts +2 -2
  366. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  367. package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts +3 -0
  368. package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts.map +1 -1
  369. package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts +3 -0
  370. package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts.map +1 -1
  371. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  373. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  374. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  375. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts +7 -0
  376. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
  377. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  378. package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  379. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  380. package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts +1 -1
  381. package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts.map +1 -1
  382. package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts +42 -0
  383. package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts.map +1 -0
  384. package/lib/typescript/commonjs/ui/session/index.d.ts +1 -0
  385. package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
  386. package/lib/typescript/commonjs/ui/session/useBackgroundSessionSync.d.ts +23 -0
  387. package/lib/typescript/commonjs/ui/session/useBackgroundSessionSync.d.ts.map +1 -0
  388. package/lib/typescript/commonjs/ui/types/navigation.d.ts +27 -19
  389. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  390. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +5 -5
  391. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
  392. package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts +17 -0
  393. package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts.map +1 -0
  394. package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +15 -12
  395. package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
  396. package/lib/typescript/commonjs/ui/utils/userUtils.d.ts +7 -14
  397. package/lib/typescript/commonjs/ui/utils/userUtils.d.ts.map +1 -1
  398. package/lib/typescript/module/index.d.ts +1 -2
  399. package/lib/typescript/module/index.d.ts.map +1 -1
  400. package/lib/typescript/module/notifications/deviceNotifications.d.ts +51 -0
  401. package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -1
  402. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +11 -30
  403. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  404. package/lib/typescript/module/ui/components/AvatarCameraBadge.d.ts.map +1 -1
  405. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  406. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +7 -0
  407. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  408. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  409. package/lib/typescript/module/ui/components/OxySignInButton.d.ts +2 -1
  410. package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
  411. package/lib/typescript/module/ui/components/ProfileButton.d.ts +3 -0
  412. package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
  413. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
  414. package/lib/typescript/module/ui/components/authChooser/types.d.ts +6 -0
  415. package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
  416. package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts +1 -1
  417. package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
  418. package/lib/typescript/module/ui/components/internal/PinInput.d.ts.map +1 -1
  419. package/lib/typescript/module/ui/components/payment/types.d.ts +6 -6
  420. package/lib/typescript/module/ui/components/payment/types.d.ts.map +1 -1
  421. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  422. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +0 -40
  423. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
  424. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +11 -2
  425. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  426. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +26 -7
  427. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
  428. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +0 -1
  429. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  430. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  431. package/lib/typescript/module/ui/hooks/queries/paymentTypes.d.ts +3 -2
  432. package/lib/typescript/module/ui/hooks/queries/paymentTypes.d.ts.map +1 -1
  433. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +3 -2
  434. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
  435. package/lib/typescript/module/ui/hooks/queries/userCache.d.ts +2 -2
  436. package/lib/typescript/module/ui/hooks/queries/userCache.d.ts.map +1 -1
  437. package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
  438. package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
  439. package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts +2 -2
  440. package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts.map +1 -1
  441. package/lib/typescript/module/ui/hooks/useAuth.d.ts +10 -6
  442. package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
  443. package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +3 -2
  444. package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -1
  445. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  446. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +7 -2
  447. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
  448. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +8 -0
  449. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
  450. package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -1
  451. package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +6 -0
  452. package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -1
  453. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  454. package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts.map +1 -1
  455. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  456. package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
  457. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +2 -2
  458. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  459. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +3 -0
  460. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -1
  461. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +3 -0
  462. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -1
  463. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  464. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  465. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  466. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  467. package/lib/typescript/module/ui/screens/UserListScreen.d.ts +7 -0
  468. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  469. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  470. package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  471. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  472. package/lib/typescript/module/ui/screens/trust/trustTier.d.ts +1 -1
  473. package/lib/typescript/module/ui/screens/trust/trustTier.d.ts.map +1 -1
  474. package/lib/typescript/module/ui/session/backgroundSession.d.ts +42 -0
  475. package/lib/typescript/module/ui/session/backgroundSession.d.ts.map +1 -0
  476. package/lib/typescript/module/ui/session/index.d.ts +1 -0
  477. package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
  478. package/lib/typescript/module/ui/session/useBackgroundSessionSync.d.ts +23 -0
  479. package/lib/typescript/module/ui/session/useBackgroundSessionSync.d.ts.map +1 -0
  480. package/lib/typescript/module/ui/types/navigation.d.ts +27 -19
  481. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  482. package/lib/typescript/module/ui/utils/fileManagement.d.ts +5 -5
  483. package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
  484. package/lib/typescript/module/ui/utils/netConnectivity.d.ts +17 -0
  485. package/lib/typescript/module/ui/utils/netConnectivity.d.ts.map +1 -0
  486. package/lib/typescript/module/ui/utils/oauthReturn.d.ts +15 -12
  487. package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
  488. package/lib/typescript/module/ui/utils/userUtils.d.ts +7 -14
  489. package/lib/typescript/module/ui/utils/userUtils.d.ts.map +1 -1
  490. package/lib/typescript/types/expo-image-picker.d.ts +35 -0
  491. package/package.json +32 -12
  492. package/src/index.ts +19 -16
  493. package/src/notifications/deviceNotifications.ts +82 -0
  494. package/src/types/expo-image-picker.d.ts +35 -0
  495. package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +215 -0
  496. package/src/ui/boot/runProviderColdBoot.ts +24 -101
  497. package/src/ui/components/AvatarCameraBadge.tsx +2 -1
  498. package/src/ui/components/FollowButton.tsx +1 -1
  499. package/src/ui/components/OxyAccountDialogScreen.tsx +13 -1
  500. package/src/ui/components/OxyAuthChooser.tsx +31 -20
  501. package/src/ui/components/OxyProvider.tsx +8 -7
  502. package/src/ui/components/OxySignInButton.tsx +2 -1
  503. package/src/ui/components/ProfileButton.tsx +15 -20
  504. package/src/ui/components/authChooser/AccountsMenuView.tsx +66 -57
  505. package/src/ui/components/authChooser/types.ts +6 -0
  506. package/src/ui/components/authChooser/useUsernameAvailability.ts +1 -1
  507. package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
  508. package/src/ui/components/internal/PinInput.tsx +1 -0
  509. package/src/ui/components/logo/LogoText.tsx +4 -4
  510. package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
  511. package/src/ui/components/payment/PaymentSummaryStep.tsx +2 -2
  512. package/src/ui/components/payment/types.ts +24 -24
  513. package/src/ui/components/styles/shadow.tsx +2 -2
  514. package/src/ui/context/OxyContext.tsx +35 -46
  515. package/src/ui/context/__tests__/commitSessionFlow.test.ts +13 -89
  516. package/src/ui/context/commitSessionFlow.ts +3 -61
  517. package/src/ui/context/hooks/useAuthOperations.ts +26 -1
  518. package/src/ui/context/oxyContextTypes.ts +26 -7
  519. package/src/ui/context/useOxyAccountGraph.ts +4 -4
  520. package/src/ui/hooks/mutations/mutationFactory.ts +1 -1
  521. package/src/ui/hooks/mutations/useAccountMutations.ts +1 -1
  522. package/src/ui/hooks/mutations/useServicesMutations.ts +1 -1
  523. package/src/ui/hooks/queries/paymentTypes.ts +3 -2
  524. package/src/ui/hooks/queries/usePaymentQueries.ts +3 -2
  525. package/src/ui/hooks/queries/userCache.ts +169 -148
  526. package/src/ui/hooks/useAssets.ts +1 -1
  527. package/src/ui/hooks/useAsyncAction.ts +3 -3
  528. package/src/ui/hooks/useAuth.ts +12 -6
  529. package/src/ui/hooks/useAvatarPicker.ts +1 -1
  530. package/src/ui/hooks/useOnlineStatus.ts +3 -2
  531. package/src/ui/hooks/useSessionManagement.ts +0 -2
  532. package/src/ui/hooks/useSettingToggle.ts +1 -1
  533. package/src/ui/hooks/useSurfaceHeader.ts +90 -15
  534. package/src/ui/navigation/accountDialogManager.ts +9 -0
  535. package/src/ui/oauth/__tests__/oauthPopup.test.ts +26 -0
  536. package/src/ui/oauth/browserAuthTransport.ts +55 -49
  537. package/src/ui/oauth/oauthPopup.ts +61 -3
  538. package/src/ui/screens/AccountMembersScreen.tsx +1 -1
  539. package/src/ui/screens/AccountSettingsScreen.tsx +45 -17
  540. package/src/ui/screens/AccountVerificationScreen.tsx +1 -1
  541. package/src/ui/screens/AppInfoScreen.tsx +1 -1
  542. package/src/ui/screens/AvatarCropScreen.tsx +1 -1
  543. package/src/ui/screens/ChangeAvatarScreen.tsx +7 -4
  544. package/src/ui/screens/ConnectedAppsScreen.tsx +2 -2
  545. package/src/ui/screens/CreateAccountScreen.tsx +55 -15
  546. package/src/ui/screens/EditProfileFieldScreen.tsx +4 -4
  547. package/src/ui/screens/EditProfileScreen.tsx +6 -3
  548. package/src/ui/screens/FAQScreen.tsx +1 -1
  549. package/src/ui/screens/FeedbackScreen.tsx +741 -575
  550. package/src/ui/screens/FileManagementScreen.tsx +1 -1
  551. package/src/ui/screens/FollowersListScreen.tsx +3 -0
  552. package/src/ui/screens/FollowingListScreen.tsx +3 -0
  553. package/src/ui/screens/HelpSupportScreen.tsx +1 -1
  554. package/src/ui/screens/HistoryViewScreen.tsx +5 -20
  555. package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
  556. package/src/ui/screens/LegalDocumentsScreen.tsx +1 -1
  557. package/src/ui/screens/ManageAccountScreen.tsx +9 -2
  558. package/src/ui/screens/PremiumSubscriptionScreen.tsx +4 -4
  559. package/src/ui/screens/PrivacySettingsScreen.tsx +15 -12
  560. package/src/ui/screens/ProfileScreen.tsx +24 -6
  561. package/src/ui/screens/SavesCollectionsScreen.tsx +1 -1
  562. package/src/ui/screens/UserListScreen.tsx +18 -8
  563. package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
  564. package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
  565. package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +14 -5
  566. package/src/ui/screens/trust/TrustCenterScreen.tsx +2 -2
  567. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +6 -5
  568. package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
  569. package/src/ui/screens/trust/TrustRulesScreen.tsx +1 -1
  570. package/src/ui/screens/trust/trustTier.ts +1 -1
  571. package/src/ui/session/__tests__/backgroundSession.test.ts +392 -0
  572. package/src/ui/session/backgroundSession.ts +313 -0
  573. package/src/ui/session/index.ts +1 -0
  574. package/src/ui/session/useBackgroundSessionSync.ts +92 -0
  575. package/src/ui/types/navigation.ts +27 -19
  576. package/src/ui/utils/fileManagement.ts +108 -92
  577. package/src/ui/utils/netConnectivity.ts +27 -0
  578. package/src/ui/utils/oauthReturn.ts +23 -33
  579. package/src/ui/utils/userUtils.ts +27 -32
  580. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +0 -48
  581. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +0 -1
  582. package/lib/commonjs/ui/utils/crossOriginRestore.js +0 -140
  583. package/lib/commonjs/ui/utils/crossOriginRestore.js.map +0 -1
  584. package/lib/module/ui/oauth/legacyRedirectLanes.js +0 -44
  585. package/lib/module/ui/oauth/legacyRedirectLanes.js.map +0 -1
  586. package/lib/module/ui/utils/crossOriginRestore.js +0 -131
  587. package/lib/module/ui/utils/crossOriginRestore.js.map +0 -1
  588. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +0 -40
  589. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
  590. package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +0 -43
  591. package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +0 -1
  592. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +0 -40
  593. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
  594. package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +0 -43
  595. package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +0 -1
  596. package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +0 -281
  597. package/src/ui/oauth/legacyRedirectLanes.ts +0 -43
  598. package/src/ui/utils/__tests__/crossOriginRestore.test.ts +0 -143
  599. package/src/ui/utils/crossOriginRestore.ts +0 -169
@@ -1 +0,0 @@
1
- {"version":3,"names":["_core","require","_isWebBrowser","_oauthReturn","_oauthNavigation","sessionStore","globalThis","sessionStorage","isCrossOriginRestoreBlocked","store","Boolean","getItem","OXY_CROSS_ORIGIN_RESTORE_ATTEMPTED_KEY","OXY_SILENT_OAUTH_ATTEMPTED_KEY","markCrossOriginRestoreAttempted","setItem","clearCrossOriginRestoreGuards","key","removeItem","isSilentRestoreEligibleOrigin","origin","isLoopbackOrigin","isIdpHubOrigin","isOfficialWebOrigin","maybeStartSilentOAuthRestore","opts","isWebBrowser","location","params","URLSearchParams","search","has","codeVerifier","codeChallenge","generatePkcePair","state","generateOAuthState","persistOAuthHandshake","redirectUri","normalizeOAuthRedirectUri","authorizeUrl","buildOAuthAuthorizeUrl","authorizeBaseUrl","clientId","scope","prompt","redirectToAuthorize","error","logger","warn","component","consumeSilentOAuthError","history","get","replaceState","url","URL","href","searchParams","delete","replaceUrlAfterOAuthReturn","pathname","hash","clearOAuthHandshake"],"sourceRoot":"../../../../src","sources":["ui/utils/crossOriginRestore.ts"],"mappings":";;;;;;;;;;;AACA,IAAAA,KAAA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ode-only lanes that navigate the RP's TOP-LEVEL window
5
- * to the IdP without a user gesture.
6
- *
7
- * `webAuthMode: 'popup'` exists to guarantee exactly one thing: the relying
8
- * party never leaves its route. Two mechanics in this SDK break that guarantee,
9
- * because each replaces the whole document on its own initiative:
10
- *
11
- * 1. **Cold-boot silent restore** — a full-page `prompt=none` authorize bounce
12
- * to `auth.oxy.so` when the device-secret mint finds no local session
13
- * (`maybeStartSilentOAuthRestore`, called from `runProviderColdBoot`).
14
- * 2. **Post-sign-in hub sync** — a full-page hop to `auth.oxy.so/sync` that
15
- * plants this device's credential on the IdP hub so OTHER origins can later
16
- * run lane 1 (`syncHubAfterSignIn`, called from the `commitSession` funnel).
17
- *
18
- * Both belong to the redirect transport and are kept only for the migration
19
- * window (issue #691, "Cold boot and cross-domain behavior"). In popup mode a
20
- * domain with no local credential simply resolves SIGNED OUT, and the user's
21
- * next explicit "Continue with Oxy" opens the popup — from a real user gesture,
22
- * never automatically.
23
- *
24
- * NOT covered here, and correctly enabled in BOTH modes: navigations the user
25
- * asked for. When the browser blocks the popup, `startWebOAuthSignIn` still
26
- * falls back to a full-page redirect rather than dead-ending the sign-in, and
27
- * `tryCompleteOAuthReturn` still consumes a `?code=` that is already on the URL.
28
- *
29
- * PHASE 7b: once the pilot flips the default transport to `'popup'`, this
30
- * predicate and BOTH lanes above are deleted outright. Grepping this symbol
31
- * finds every site that has to go.
32
- */
33
-
34
- /**
35
- * Whether a provider running `webAuthMode` may perform an SDK-initiated,
36
- * non-gesture, full-page navigation to the IdP.
37
- *
38
- * `true` only for `'redirect'` — still the default and the compatibility path,
39
- * whose behaviour must stay byte-for-byte unchanged.
40
- */
41
- export function allowsAutomaticIdpRedirect(webAuthMode) {
42
- return webAuthMode === 'redirect';
43
- }
44
- //# sourceMappingURL=legacyRedirectLanes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["allowsAutomaticIdpRedirect","webAuthMode"],"sourceRoot":"../../../../src","sources":["ui/oauth/legacyRedirectLanes.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,0BAA0BA,CAACC,WAAwB,EAAW;EAC5E,OAAOA,WAAW,KAAK,UAAU;AACnC","ignoreList":[]}
@@ -1,131 +0,0 @@
1
- "use strict";
2
-
3
- import { buildOAuthAuthorizeUrl, generateOAuthState, generatePkcePair, isIdpHubOrigin, isLoopbackOrigin, isOfficialWebOrigin, OXY_CROSS_ORIGIN_RESTORE_ATTEMPTED_KEY, OXY_SILENT_OAUTH_ATTEMPTED_KEY, clearOAuthHandshake, persistOAuthHandshake, normalizeOAuthRedirectUri, logger } from '@oxyhq/core';
4
- import { isWebBrowser } from "./isWebBrowser.js";
5
- import { replaceUrlAfterOAuthReturn } from "./oauthReturn.js";
6
- import { redirectToAuthorize } from "../components/oauthNavigation.js";
7
- function sessionStore() {
8
- return globalThis.sessionStorage;
9
- }
10
-
11
- /** True when this tab already attempted cross-origin silent OAuth restore. */
12
- export function isCrossOriginRestoreBlocked() {
13
- const store = sessionStore();
14
- if (!store) return false;
15
- return Boolean(store.getItem(OXY_CROSS_ORIGIN_RESTORE_ATTEMPTED_KEY) || store.getItem(OXY_SILENT_OAUTH_ATTEMPTED_KEY));
16
- }
17
-
18
- /** Mark restore as attempted — never auto-retry until sign-out clears guards. */
19
- export function markCrossOriginRestoreAttempted() {
20
- const store = sessionStore();
21
- if (!store) return;
22
- store.setItem(OXY_CROSS_ORIGIN_RESTORE_ATTEMPTED_KEY, '1');
23
- store.setItem(OXY_SILENT_OAUTH_ATTEMPTED_KEY, '1');
24
- }
25
-
26
- /** Clear all cross-origin restore loop guards (call on sign-out). */
27
- export function clearCrossOriginRestoreGuards() {
28
- const store = sessionStore();
29
- if (!store) return;
30
- for (const key of [OXY_CROSS_ORIGIN_RESTORE_ATTEMPTED_KEY, OXY_SILENT_OAUTH_ATTEMPTED_KEY]) {
31
- store.removeItem(key);
32
- }
33
- }
34
-
35
- /**
36
- * Whether cold boot should attempt silent cross-origin OAuth restore for the
37
- * given web origin.
38
- *
39
- * Mirrors the hub-sync WRITE gate (`syncHubAfterSignIn`): only OFFICIAL Oxy web
40
- * origins participate in cross-app SSO — a random third-party / preview origin
41
- * must never have its tab bounced to the IdP. Additionally, loopback / local-dev
42
- * origins are EXCLUDED here even though {@link isOfficialWebOrigin} treats them
43
- * as official: a developer's local app must never be redirected to a hosted IdP
44
- * on cold boot (it signs in through the in-app dialog instead). The central IdP
45
- * hub's own origin is excluded to avoid a wasteful self-hop.
46
- */
47
- export function isSilentRestoreEligibleOrigin(origin) {
48
- if (isLoopbackOrigin(origin)) return false;
49
- if (isIdpHubOrigin()) return false;
50
- return isOfficialWebOrigin(origin);
51
- }
52
- /**
53
- * Top-level redirect to auth.oxy.so/authorize with `prompt=none` for silent
54
- * cross-origin session restore on all web apps (official + third-party).
55
- */
56
- export async function maybeStartSilentOAuthRestore(opts) {
57
- if (!isWebBrowser()) return false;
58
- const location = globalThis.location;
59
- if (!location) return false;
60
-
61
- // Defense-in-depth: never bounce a loopback / non-official / IdP-hub origin to
62
- // a hosted authorize endpoint (the caller gates on this too).
63
- if (!isSilentRestoreEligibleOrigin(location.origin)) {
64
- return false;
65
- }
66
- if (isCrossOriginRestoreBlocked()) {
67
- return false;
68
- }
69
- const params = new URLSearchParams(location.search);
70
- if (params.has('code') || params.has('error')) {
71
- return false;
72
- }
73
- try {
74
- const {
75
- codeVerifier,
76
- codeChallenge
77
- } = await generatePkcePair();
78
- const state = await generateOAuthState();
79
- if (!persistOAuthHandshake(state, codeVerifier)) {
80
- return false;
81
- }
82
- const redirectUri = normalizeOAuthRedirectUri(opts.redirectUri ?? location.origin);
83
- const authorizeUrl = buildOAuthAuthorizeUrl({
84
- authorizeBaseUrl: opts.authorizeBaseUrl,
85
- clientId: opts.clientId,
86
- redirectUri,
87
- state,
88
- codeChallenge,
89
- scope: opts.scope,
90
- prompt: 'none'
91
- });
92
- markCrossOriginRestoreAttempted();
93
- redirectToAuthorize(authorizeUrl);
94
- return true;
95
- } catch (error) {
96
- logger.warn('Silent OAuth restore skipped', {
97
- component: 'crossOriginRestore'
98
- }, error);
99
- return false;
100
- }
101
- }
102
-
103
- /**
104
- * When the RP lands with OAuth error params from a silent authorize attempt,
105
- * strip them and return whether the error was terminal for silent restore.
106
- */
107
- export function consumeSilentOAuthError() {
108
- if (!isWebBrowser()) return null;
109
- const location = globalThis.location;
110
- const history = globalThis.history;
111
- if (!location) return null;
112
- const params = new URLSearchParams(location.search);
113
- const error = params.get('error');
114
- if (error !== 'login_required' && error !== 'consent_required') {
115
- return null;
116
- }
117
- markCrossOriginRestoreAttempted();
118
- if (history?.replaceState) {
119
- const url = new URL(location.href);
120
- url.searchParams.delete('error');
121
- url.searchParams.delete('error_description');
122
- url.searchParams.delete('state');
123
- // Silent restore failed, but the visitor still asked for a specific page.
124
- // Put them back on it rather than leaving them on the bare origin the IdP
125
- // redirected to.
126
- replaceUrlAfterOAuthReturn(`${url.pathname}${url.search}${url.hash}`);
127
- }
128
- clearOAuthHandshake();
129
- return error;
130
- }
131
- //# sourceMappingURL=crossOriginRestore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["buildOAuthAuthorizeUrl","generateOAuthState","generatePkcePair","isIdpHubOrigin","isLoopbackOrigin","isOfficialWebOrigin","OXY_CROSS_ORIGIN_RESTORE_ATTEMPTED_KEY","OXY_SILENT_OAUTH_ATTEMPTED_KEY","clearOAuthHandshake","persistOAuthHandshake","normalizeOAuthRedirectUri","logger","isWebBrowser","replaceUrlAfterOAuthReturn","redirectToAuthorize","sessionStore","globalThis","sessionStorage","isCrossOriginRestoreBlocked","store","Boolean","getItem","markCrossOriginRestoreAttempted","setItem","clearCrossOriginRestoreGuards","key","removeItem","isSilentRestoreEligibleOrigin","origin","maybeStartSilentOAuthRestore","opts","location","params","URLSearchParams","search","has","codeVerifier","codeChallenge","state","redirectUri","authorizeUrl","authorizeBaseUrl","clientId","scope","prompt","error","warn","component","consumeSilentOAuthError","history","get","replaceState","url","URL","href","searchParams","delete","pathname","hash"],"sourceRoot":"../../../../src","sources":["ui/utils/crossOriginRestore.ts"],"mappings":";;AACA,SACEA,sBAAsB,EACtBC,kBAAkB,EAClBC,gBAAgB,EAChBC,cAAc,EACdC,gBAAgB,EAChBC,mBAAmB,EACnBC,sCAAsC,EACtCC,8BAA8B,EAC9BC,mBAAmB,EACnBC,qBAAqB,EACrBC,yBAAyB,EACzBC,MAAM,QACD,aAAa;AACpB,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,0BAA0B,QAAQ,kBAAe;AAC1D,SAASC,mBAAmB,QAAQ,kCAA+B;AAEnE,SAASC,YAAYA,CAAA,EAAwB;EAC3C,OAAQC,UAAU,CAAkCC,cAAc;AACpE;;AAEA;AACA,OAAO,SAASC,2BAA2BA,CAAA,EAAY;EACrD,MAAMC,KAAK,GAAGJ,YAAY,CAAC,CAAC;EAC5B,IAAI,CAACI,KAAK,EAAE,OAAO,KAAK;EACxB,OAAOC,OAAO,CACZD,KAAK,CAACE,OAAO,CAACf,sCAAsC,CAAC,IACnDa,KAAK,CAACE,OAAO,CAACd,8BAA8B,CAChD,CAAC;AACH;;AAEA;AACA,OAAO,SAASe,+BAA+BA,CAAA,EAAS;EACtD,MAAMH,KAAK,GAAGJ,YAAY,CAAC,CAAC;EAC5B,IAAI,CAACI,KAAK,EAAE;EACZA,KAAK,CAACI,OAAO,CAACjB,sCAAsC,EAAE,GAAG,CAAC;EAC1Da,KAAK,CAACI,OAAO,CAAChB,8BAA8B,EAAE,GAAG,CAAC;AACpD;;AAEA;AACA,OAAO,SAASiB,6BAA6BA,CAAA,EAAS;EACpD,MAAML,KAAK,GAAGJ,YAAY,CAAC,CAAC;EAC5B,IAAI,CAACI,KAAK,EAAE;EACZ,K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;IAChCJ,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,mBAAmB,CAAC;IAC5CJ,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,OAAO,CAAC;IAChC;IACA;IACA;IACA3C,0BAA0B,CAAC,GAAGuC,GAAG,CAACK,QAAQ,GAAGL,GAAG,CAAClB,MAAM,GAAGkB,GAAG,CAACM,IAAI,EAAE,CAAC;EACvE;EACAlD,mBAAmB,CAAC,CAAC;EACrB,OAAOqC,KAAK;AACd","ignoreList":[]}
@@ -1,40 +0,0 @@
1
- /**
2
- * The legacy, redirect-mode-only lanes that navigate the RP's TOP-LEVEL window
3
- * to the IdP without a user gesture.
4
- *
5
- * `webAuthMode: 'popup'` exists to guarantee exactly one thing: the relying
6
- * party never leaves its route. Two mechanics in this SDK break that guarantee,
7
- * because each replaces the whole document on its own initiative:
8
- *
9
- * 1. **Cold-boot silent restore** — a full-page `prompt=none` authorize bounce
10
- * to `auth.oxy.so` when the device-secret mint finds no local session
11
- * (`maybeStartSilentOAuthRestore`, called from `runProviderColdBoot`).
12
- * 2. **Post-sign-in hub sync** — a full-page hop to `auth.oxy.so/sync` that
13
- * plants this device's credential on the IdP hub so OTHER origins can later
14
- * run lane 1 (`syncHubAfterSignIn`, called from the `commitSession` funnel).
15
- *
16
- * Both belong to the redirect transport and are kept only for the migration
17
- * window (issue #691, "Cold boot and cross-domain behavior"). In popup mode a
18
- * domain with no local credential simply resolves SIGNED OUT, and the user's
19
- * next explicit "Continue with Oxy" opens the popup — from a real user gesture,
20
- * never automatically.
21
- *
22
- * NOT covered here, and correctly enabled in BOTH modes: navigations the user
23
- * asked for. When the browser blocks the popup, `startWebOAuthSignIn` still
24
- * falls back to a full-page redirect rather than dead-ending the sign-in, and
25
- * `tryCompleteOAuthReturn` still consumes a `?code=` that is already on the URL.
26
- *
27
- * PHASE 7b: once the pilot flips the default transport to `'popup'`, this
28
- * predicate and BOTH lanes above are deleted outright. Grepping this symbol
29
- * finds every site that has to go.
30
- */
31
- import type { WebAuthMode } from './types';
32
- /**
33
- * Whether a provider running `webAuthMode` may perform an SDK-initiated,
34
- * non-gesture, full-page navigation to the IdP.
35
- *
36
- * `true` only for `'redirect'` — still the default and the compatibility path,
37
- * whose behaviour must stay byte-for-byte unchanged.
38
- */
39
- export declare function allowsAutomaticIdpRedirect(webAuthMode: WebAuthMode): boolean;
40
- //# sourceMappingURL=legacyRedirectLanes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacyRedirectLanes.d.ts","sourceRoot":"","sources":["../../../../../src/ui/oauth/legacyRedirectLanes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAE5E"}
@@ -1,43 +0,0 @@
1
- import type { OxyServices } from '@oxyhq/core';
2
- /** True when this tab already attempted cross-origin silent OAuth restore. */
3
- export declare function isCrossOriginRestoreBlocked(): boolean;
4
- /** Mark restore as attempted — never auto-retry until sign-out clears guards. */
5
- export declare function markCrossOriginRestoreAttempted(): void;
6
- /** Clear all cross-origin restore loop guards (call on sign-out). */
7
- export declare function clearCrossOriginRestoreGuards(): void;
8
- /**
9
- * Whether cold boot should attempt silent cross-origin OAuth restore for the
10
- * given web origin.
11
- *
12
- * Mirrors the hub-sync WRITE gate (`syncHubAfterSignIn`): only OFFICIAL Oxy web
13
- * origins participate in cross-app SSO — a random third-party / preview origin
14
- * must never have its tab bounced to the IdP. Additionally, loopback / local-dev
15
- * origins are EXCLUDED here even though {@link isOfficialWebOrigin} treats them
16
- * as official: a developer's local app must never be redirected to a hosted IdP
17
- * on cold boot (it signs in through the in-app dialog instead). The central IdP
18
- * hub's own origin is excluded to avoid a wasteful self-hop.
19
- */
20
- export declare function isSilentRestoreEligibleOrigin(origin: string): boolean;
21
- export interface SilentOAuthRestoreOptions {
22
- oxyServices: OxyServices;
23
- clientId: string;
24
- redirectUri?: string;
25
- scope?: string;
26
- /**
27
- * Authorize endpoint override (env-configurable per deployment). Defaults to
28
- * the production Oxy IdP when unset, so a local/staging app points silent
29
- * restore at its OWN IdP instead of production `auth.oxy.so`.
30
- */
31
- authorizeBaseUrl?: string;
32
- }
33
- /**
34
- * Top-level redirect to auth.oxy.so/authorize with `prompt=none` for silent
35
- * cross-origin session restore on all web apps (official + third-party).
36
- */
37
- export declare function maybeStartSilentOAuthRestore(opts: SilentOAuthRestoreOptions): Promise<boolean>;
38
- /**
39
- * When the RP lands with OAuth error params from a silent authorize attempt,
40
- * strip them and return whether the error was terminal for silent restore.
41
- */
42
- export declare function consumeSilentOAuthError(): 'login_required' | 'consent_required' | null;
43
- //# sourceMappingURL=crossOriginRestore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crossOriginRestore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/crossOriginRestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAuB/C,8EAA8E;AAC9E,wBAAgB,2BAA2B,IAAI,OAAO,CAOrD;AAED,iFAAiF;AACjF,wBAAgB,+BAA+B,IAAI,IAAI,CAKtD;AAED,qEAAqE;AACrE,wBAAgB,6BAA6B,IAAI,IAAI,CAMpD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAIrE;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAiDlB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,gBAAgB,GAAG,kBAAkB,GAAG,IAAI,CA0BtF"}
@@ -1,40 +0,0 @@
1
- /**
2
- * The legacy, redirect-mode-only lanes that navigate the RP's TOP-LEVEL window
3
- * to the IdP without a user gesture.
4
- *
5
- * `webAuthMode: 'popup'` exists to guarantee exactly one thing: the relying
6
- * party never leaves its route. Two mechanics in this SDK break that guarantee,
7
- * because each replaces the whole document on its own initiative:
8
- *
9
- * 1. **Cold-boot silent restore** — a full-page `prompt=none` authorize bounce
10
- * to `auth.oxy.so` when the device-secret mint finds no local session
11
- * (`maybeStartSilentOAuthRestore`, called from `runProviderColdBoot`).
12
- * 2. **Post-sign-in hub sync** — a full-page hop to `auth.oxy.so/sync` that
13
- * plants this device's credential on the IdP hub so OTHER origins can later
14
- * run lane 1 (`syncHubAfterSignIn`, called from the `commitSession` funnel).
15
- *
16
- * Both belong to the redirect transport and are kept only for the migration
17
- * window (issue #691, "Cold boot and cross-domain behavior"). In popup mode a
18
- * domain with no local credential simply resolves SIGNED OUT, and the user's
19
- * next explicit "Continue with Oxy" opens the popup — from a real user gesture,
20
- * never automatically.
21
- *
22
- * NOT covered here, and correctly enabled in BOTH modes: navigations the user
23
- * asked for. When the browser blocks the popup, `startWebOAuthSignIn` still
24
- * falls back to a full-page redirect rather than dead-ending the sign-in, and
25
- * `tryCompleteOAuthReturn` still consumes a `?code=` that is already on the URL.
26
- *
27
- * PHASE 7b: once the pilot flips the default transport to `'popup'`, this
28
- * predicate and BOTH lanes above are deleted outright. Grepping this symbol
29
- * finds every site that has to go.
30
- */
31
- import type { WebAuthMode } from './types.js';
32
- /**
33
- * Whether a provider running `webAuthMode` may perform an SDK-initiated,
34
- * non-gesture, full-page navigation to the IdP.
35
- *
36
- * `true` only for `'redirect'` — still the default and the compatibility path,
37
- * whose behaviour must stay byte-for-byte unchanged.
38
- */
39
- export declare function allowsAutomaticIdpRedirect(webAuthMode: WebAuthMode): boolean;
40
- //# sourceMappingURL=legacyRedirectLanes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacyRedirectLanes.d.ts","sourceRoot":"","sources":["../../../../../src/ui/oauth/legacyRedirectLanes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAS,CAAC;AAE3C;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAE5E"}
@@ -1,43 +0,0 @@
1
- import type { OxyServices } from '@oxyhq/core';
2
- /** True when this tab already attempted cross-origin silent OAuth restore. */
3
- export declare function isCrossOriginRestoreBlocked(): boolean;
4
- /** Mark restore as attempted — never auto-retry until sign-out clears guards. */
5
- export declare function markCrossOriginRestoreAttempted(): void;
6
- /** Clear all cross-origin restore loop guards (call on sign-out). */
7
- export declare function clearCrossOriginRestoreGuards(): void;
8
- /**
9
- * Whether cold boot should attempt silent cross-origin OAuth restore for the
10
- * given web origin.
11
- *
12
- * Mirrors the hub-sync WRITE gate (`syncHubAfterSignIn`): only OFFICIAL Oxy web
13
- * origins participate in cross-app SSO — a random third-party / preview origin
14
- * must never have its tab bounced to the IdP. Additionally, loopback / local-dev
15
- * origins are EXCLUDED here even though {@link isOfficialWebOrigin} treats them
16
- * as official: a developer's local app must never be redirected to a hosted IdP
17
- * on cold boot (it signs in through the in-app dialog instead). The central IdP
18
- * hub's own origin is excluded to avoid a wasteful self-hop.
19
- */
20
- export declare function isSilentRestoreEligibleOrigin(origin: string): boolean;
21
- export interface SilentOAuthRestoreOptions {
22
- oxyServices: OxyServices;
23
- clientId: string;
24
- redirectUri?: string;
25
- scope?: string;
26
- /**
27
- * Authorize endpoint override (env-configurable per deployment). Defaults to
28
- * the production Oxy IdP when unset, so a local/staging app points silent
29
- * restore at its OWN IdP instead of production `auth.oxy.so`.
30
- */
31
- authorizeBaseUrl?: string;
32
- }
33
- /**
34
- * Top-level redirect to auth.oxy.so/authorize with `prompt=none` for silent
35
- * cross-origin session restore on all web apps (official + third-party).
36
- */
37
- export declare function maybeStartSilentOAuthRestore(opts: SilentOAuthRestoreOptions): Promise<boolean>;
38
- /**
39
- * When the RP lands with OAuth error params from a silent authorize attempt,
40
- * strip them and return whether the error was terminal for silent restore.
41
- */
42
- export declare function consumeSilentOAuthError(): 'login_required' | 'consent_required' | null;
43
- //# sourceMappingURL=crossOriginRestore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crossOriginRestore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/crossOriginRestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAuB/C,8EAA8E;AAC9E,wBAAgB,2BAA2B,IAAI,OAAO,CAOrD;AAED,iFAAiF;AACjF,wBAAgB,+BAA+B,IAAI,IAAI,CAKtD;AAED,qEAAqE;AACrE,wBAAgB,6BAA6B,IAAI,IAAI,CAMpD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAIrE;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAiDlB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,gBAAgB,GAAG,kBAAkB,GAAG,IAAI,CA0BtF"}