@oxyhq/services 14.1.0 → 15.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.
- package/lib/commonjs/index.js +0 -17
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/SignInAccountChooser.js +189 -0
- package/lib/commonjs/ui/components/SignInAccountChooser.js.map +1 -0
- package/lib/commonjs/ui/components/SignInModal.js +350 -131
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +340 -1547
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +61 -64
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +14 -33
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/usePasswordSignIn.js +170 -0
- package/lib/commonjs/ui/hooks/usePasswordSignIn.js.map +1 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js +2 -5
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +2 -2
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +1 -0
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +93 -68
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +187 -0
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +3 -7
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +231 -95
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +15 -2
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/linkFormat.js +38 -0
- package/lib/commonjs/ui/screens/linkFormat.js.map +1 -0
- package/lib/commonjs/ui/session/authStore.js +146 -0
- package/lib/commonjs/ui/session/authStore.js.map +1 -0
- package/lib/commonjs/ui/session/createSessionClient.js +23 -17
- package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
- package/lib/commonjs/ui/session/index.js +13 -7
- package/lib/commonjs/ui/session/index.js.map +1 -1
- package/lib/commonjs/ui/session/tokenTransport.js +19 -31
- package/lib/commonjs/ui/session/tokenTransport.js.map +1 -1
- package/lib/commonjs/ui/utils/isWebBrowser.js +13 -0
- package/lib/commonjs/ui/utils/isWebBrowser.js.map +1 -0
- package/lib/commonjs/utils/deviceFlowSignIn.js +13 -16
- package/lib/commonjs/utils/deviceFlowSignIn.js.map +1 -1
- package/lib/module/index.js +0 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/SignInAccountChooser.js +183 -0
- package/lib/module/ui/components/SignInAccountChooser.js.map +1 -0
- package/lib/module/ui/components/SignInModal.js +352 -134
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +342 -1551
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +60 -63
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +14 -33
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/usePasswordSignIn.js +165 -0
- package/lib/module/ui/hooks/usePasswordSignIn.js.map +1 -0
- package/lib/module/ui/hooks/useProfileEditing.js +2 -5
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +1 -0
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +91 -66
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +182 -0
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -0
- package/lib/module/ui/screens/ManageAccountScreen.js +3 -7
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +233 -97
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +15 -2
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/linkFormat.js +31 -0
- package/lib/module/ui/screens/linkFormat.js.map +1 -0
- package/lib/module/ui/session/authStore.js +143 -0
- package/lib/module/ui/session/authStore.js.map +1 -0
- package/lib/module/ui/session/createSessionClient.js +22 -16
- package/lib/module/ui/session/createSessionClient.js.map +1 -1
- package/lib/module/ui/session/index.js +9 -9
- package/lib/module/ui/session/index.js.map +1 -1
- package/lib/module/ui/session/tokenTransport.js +20 -33
- package/lib/module/ui/session/tokenTransport.js.map +1 -1
- package/lib/module/ui/utils/isWebBrowser.js +11 -0
- package/lib/module/ui/utils/isWebBrowser.js.map +1 -0
- package/lib/module/utils/deviceFlowSignIn.js +14 -17
- package/lib/module/utils/deviceFlowSignIn.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +0 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInAccountChooser.d.ts +29 -0
- package/lib/typescript/commonjs/ui/components/SignInAccountChooser.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts +15 -10
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +36 -42
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +18 -23
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +0 -2
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/usePasswordSignIn.d.ts +31 -0
- package/lib/typescript/commonjs/ui/hooks/usePasswordSignIn.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts +0 -1
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts +14 -0
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts +13 -12
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts +23 -0
- package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/authStore.d.ts +33 -0
- package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +19 -15
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/index.d.ts +9 -9
- package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts +13 -19
- package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/isWebBrowser.d.ts +9 -0
- package/lib/typescript/commonjs/ui/utils/isWebBrowser.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts +15 -13
- package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +0 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInAccountChooser.d.ts +29 -0
- package/lib/typescript/module/ui/components/SignInAccountChooser.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SignInModal.d.ts +15 -10
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts +36 -42
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +18 -23
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +0 -2
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/usePasswordSignIn.d.ts +31 -0
- package/lib/typescript/module/ui/hooks/usePasswordSignIn.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts +0 -1
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts +14 -0
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts +13 -12
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/linkFormat.d.ts +23 -0
- package/lib/typescript/module/ui/screens/linkFormat.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/authStore.d.ts +33 -0
- package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/createSessionClient.d.ts +19 -15
- package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/index.d.ts +9 -9
- package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/tokenTransport.d.ts +13 -19
- package/lib/typescript/module/ui/session/tokenTransport.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/isWebBrowser.d.ts +9 -0
- package/lib/typescript/module/ui/utils/isWebBrowser.d.ts.map +1 -0
- package/lib/typescript/module/utils/deviceFlowSignIn.d.ts +15 -13
- package/lib/typescript/module/utils/deviceFlowSignIn.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +0 -4
- package/src/ui/components/SignInAccountChooser.tsx +162 -0
- package/src/ui/components/SignInModal.tsx +309 -139
- package/src/ui/context/OxyContext.tsx +532 -1785
- package/src/ui/context/hooks/useAuthOperations.ts +65 -76
- package/src/ui/hooks/useAuth.ts +14 -35
- package/src/ui/hooks/usePasswordSignIn.ts +207 -0
- package/src/ui/hooks/useProfileEditing.ts +2 -8
- package/src/ui/hooks/useSessionManagement.ts +1 -1
- package/src/ui/navigation/routes.ts +2 -0
- package/src/ui/screens/EditProfileFieldScreen.tsx +102 -66
- package/src/ui/screens/EditProfileScreen.tsx +155 -0
- package/src/ui/screens/ManageAccountScreen.tsx +3 -7
- package/src/ui/screens/OxyAuthScreen.tsx +259 -112
- package/src/ui/screens/ProfileScreen.tsx +15 -2
- package/src/ui/screens/__tests__/linkFormat.test.ts +73 -0
- package/src/ui/screens/linkFormat.ts +37 -0
- package/src/ui/session/__tests__/createSessionClient.test.ts +22 -7
- package/src/ui/session/__tests__/tokenTransport.test.ts +37 -49
- package/src/ui/session/authStore.ts +164 -0
- package/src/ui/session/createSessionClient.ts +30 -17
- package/src/ui/session/index.ts +10 -9
- package/src/ui/session/tokenTransport.ts +26 -36
- package/src/ui/utils/isWebBrowser.ts +8 -0
- package/src/utils/__tests__/deviceFlowSignIn.test.ts +50 -131
- package/src/utils/deviceFlowSignIn.ts +19 -26
- package/lib/commonjs/ui/context/inSessionTokenRefresh.js +0 -243
- package/lib/commonjs/ui/context/inSessionTokenRefresh.js.map +0 -1
- package/lib/commonjs/ui/context/silentSessionRestore.js +0 -56
- package/lib/commonjs/ui/context/silentSessionRestore.js.map +0 -1
- package/lib/commonjs/ui/hooks/useWebSSO.js +0 -28
- package/lib/commonjs/ui/hooks/useWebSSO.js.map +0 -1
- package/lib/commonjs/ui/session/projectSessionState.js +0 -86
- package/lib/commonjs/ui/session/projectSessionState.js.map +0 -1
- package/lib/commonjs/ui/session/sessionClientHost.js +0 -30
- package/lib/commonjs/ui/session/sessionClientHost.js.map +0 -1
- package/lib/commonjs/ui/utils/activeAuthuser.js +0 -142
- package/lib/commonjs/ui/utils/activeAuthuser.js.map +0 -1
- package/lib/commonjs/utils/crossApex.js +0 -74
- package/lib/commonjs/utils/crossApex.js.map +0 -1
- package/lib/module/ui/context/inSessionTokenRefresh.js +0 -238
- package/lib/module/ui/context/inSessionTokenRefresh.js.map +0 -1
- package/lib/module/ui/context/silentSessionRestore.js +0 -53
- package/lib/module/ui/context/silentSessionRestore.js.map +0 -1
- package/lib/module/ui/hooks/useWebSSO.js +0 -24
- package/lib/module/ui/hooks/useWebSSO.js.map +0 -1
- package/lib/module/ui/session/projectSessionState.js +0 -79
- package/lib/module/ui/session/projectSessionState.js.map +0 -1
- package/lib/module/ui/session/sessionClientHost.js +0 -26
- package/lib/module/ui/session/sessionClientHost.js.map +0 -1
- package/lib/module/ui/utils/activeAuthuser.js +0 -134
- package/lib/module/ui/utils/activeAuthuser.js.map +0 -1
- package/lib/module/utils/crossApex.js +0 -69
- package/lib/module/utils/crossApex.js.map +0 -1
- package/lib/typescript/commonjs/ui/context/inSessionTokenRefresh.d.ts +0 -106
- package/lib/typescript/commonjs/ui/context/inSessionTokenRefresh.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/context/silentSessionRestore.d.ts +0 -36
- package/lib/typescript/commonjs/ui/context/silentSessionRestore.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts +0 -19
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/session/projectSessionState.d.ts +0 -45
- package/lib/typescript/commonjs/ui/session/projectSessionState.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/session/sessionClientHost.d.ts +0 -14
- package/lib/typescript/commonjs/ui/session/sessionClientHost.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts +0 -67
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/crossApex.d.ts +0 -55
- package/lib/typescript/commonjs/utils/crossApex.d.ts.map +0 -1
- package/lib/typescript/module/ui/context/inSessionTokenRefresh.d.ts +0 -106
- package/lib/typescript/module/ui/context/inSessionTokenRefresh.d.ts.map +0 -1
- package/lib/typescript/module/ui/context/silentSessionRestore.d.ts +0 -36
- package/lib/typescript/module/ui/context/silentSessionRestore.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts +0 -19
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts.map +0 -1
- package/lib/typescript/module/ui/session/projectSessionState.d.ts +0 -45
- package/lib/typescript/module/ui/session/projectSessionState.d.ts.map +0 -1
- package/lib/typescript/module/ui/session/sessionClientHost.d.ts +0 -14
- package/lib/typescript/module/ui/session/sessionClientHost.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/activeAuthuser.d.ts +0 -67
- package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +0 -1
- package/lib/typescript/module/utils/crossApex.d.ts +0 -55
- package/lib/typescript/module/utils/crossApex.d.ts.map +0 -1
- package/src/ui/context/inSessionTokenRefresh.ts +0 -264
- package/src/ui/context/silentSessionRestore.ts +0 -53
- package/src/ui/hooks/useWebSSO.ts +0 -23
- package/src/ui/session/__tests__/projectSessionState.test.ts +0 -114
- package/src/ui/session/__tests__/sessionClientHost.test.ts +0 -43
- package/src/ui/session/projectSessionState.ts +0 -85
- package/src/ui/session/sessionClientHost.ts +0 -27
- package/src/ui/utils/activeAuthuser.ts +0 -142
- package/src/utils/crossApex.ts +0 -75
|
@@ -11,27 +11,38 @@ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
|
11
11
|
var _theme = require("@oxyhq/bloom/theme");
|
|
12
12
|
var _button = require("@oxyhq/bloom/button");
|
|
13
13
|
var _loading = require("@oxyhq/bloom/loading");
|
|
14
|
+
var _bloom = require("@oxyhq/bloom");
|
|
15
|
+
var _vectorIcons = require("@expo/vector-icons");
|
|
16
|
+
var _core = require("@oxyhq/core");
|
|
14
17
|
var _OxyContext = require("../context/OxyContext.js");
|
|
15
18
|
var _OxyLogo = _interopRequireDefault(require("./OxyLogo.js"));
|
|
16
19
|
var _AnotherDeviceQR = _interopRequireDefault(require("./AnotherDeviceQR.js"));
|
|
20
|
+
var _SignInAccountChooser = _interopRequireDefault(require("./SignInAccountChooser.js"));
|
|
21
|
+
var _useSwitchableAccounts = require("../hooks/useSwitchableAccounts.js");
|
|
22
|
+
var _useI18n = require("../hooks/useI18n.js");
|
|
17
23
|
var _useOxyAuthSession = require("../hooks/useOxyAuthSession.js");
|
|
18
|
-
var
|
|
24
|
+
var _usePasswordSignIn = require("../hooks/usePasswordSignIn.js");
|
|
19
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
26
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
27
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
22
28
|
/**
|
|
23
|
-
* SignInModal
|
|
29
|
+
* SignInModal — web-first centered sign-in modal.
|
|
24
30
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
31
|
+
* Two phases, Google-style:
|
|
32
|
+
* 1. Account chooser (FRONT screen, shown when the device/user already has
|
|
33
|
+
* accounts): pick an account to continue as — one tap switches through the
|
|
34
|
+
* SAME `switchToAccount` path the account switcher uses — or "Use another
|
|
35
|
+
* account" to reveal the sign-in options.
|
|
36
|
+
* 2. Sign-in options: the first-party password flow (identifier → password →
|
|
37
|
+
* optional 2FA, `usePasswordSignIn`) as the PRIMARY action, with the
|
|
38
|
+
* cross-app device flow (same-device deep-link + "sign in on another device"
|
|
39
|
+
* QR) as a SECONDARY option below an "or" divider.
|
|
28
40
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* Animates with a fade + scale effect.
|
|
41
|
+
* When there are no accounts the modal opens straight on the sign-in options.
|
|
42
|
+
* The device-flow machinery lives in the shared `useOxyAuthSession` hook (the
|
|
43
|
+
* native `OxyAuthScreen` consumes it too — neither container re-implements the
|
|
44
|
+
* transport). Animates with a fade + scale; per-phase content cross-fades and
|
|
45
|
+
* respects reduced motion.
|
|
35
46
|
*/
|
|
36
47
|
|
|
37
48
|
// Store for modal visibility with subscription support
|
|
@@ -63,11 +74,6 @@ const SignInModal = () => {
|
|
|
63
74
|
const [visible, setVisible] = (0, _react.useState)(false);
|
|
64
75
|
const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
|
|
65
76
|
const theme = (0, _theme.useTheme)();
|
|
66
|
-
const {
|
|
67
|
-
oxyServices,
|
|
68
|
-
handleWebSession,
|
|
69
|
-
clientId
|
|
70
|
-
} = (0, _OxyContext.useOxy)();
|
|
71
77
|
|
|
72
78
|
// Register the imperative visibility callback.
|
|
73
79
|
(0, _react.useEffect)(() => {
|
|
@@ -78,56 +84,71 @@ const SignInModal = () => {
|
|
|
78
84
|
}, []);
|
|
79
85
|
if (!visible) return null;
|
|
80
86
|
|
|
81
|
-
//
|
|
82
|
-
//
|
|
83
|
-
// cleaned up on close) — the inner component is unmounted when `visible`
|
|
84
|
-
// flips false, which runs the hook's unmount cleanup.
|
|
87
|
+
// Mounting the content only while visible preserves the session-created-on-open
|
|
88
|
+
// / cleaned-up-on-close behaviour and resets the phase state on every reopen.
|
|
85
89
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SignInModalContent, {
|
|
86
90
|
theme: theme,
|
|
87
|
-
insets: insets
|
|
88
|
-
oxyServices: oxyServices,
|
|
89
|
-
handleWebSession: handleWebSession,
|
|
90
|
-
clientId: clientId
|
|
91
|
+
insets: insets
|
|
91
92
|
});
|
|
92
93
|
};
|
|
93
94
|
const SignInModalContent = ({
|
|
94
95
|
theme,
|
|
95
|
-
insets
|
|
96
|
-
oxyServices,
|
|
97
|
-
handleWebSession,
|
|
98
|
-
clientId
|
|
96
|
+
insets
|
|
99
97
|
}) => {
|
|
98
|
+
const {
|
|
99
|
+
oxyServices,
|
|
100
|
+
handleWebSession,
|
|
101
|
+
clientId,
|
|
102
|
+
switchToAccount
|
|
103
|
+
} = (0, _OxyContext.useOxy)();
|
|
104
|
+
const {
|
|
105
|
+
t
|
|
106
|
+
} = (0, _useI18n.useI18n)();
|
|
107
|
+
const {
|
|
108
|
+
accounts
|
|
109
|
+
} = (0, _useSwitchableAccounts.useSwitchableAccounts)();
|
|
110
|
+
|
|
111
|
+
// Phase: the chooser is the front screen whenever accounts exist AND the user
|
|
112
|
+
// has not tapped "Use another account" this session.
|
|
113
|
+
const [useAnother, setUseAnother] = (0, _react.useState)(false);
|
|
114
|
+
const [switchingId, setSwitchingId] = (0, _react.useState)(null);
|
|
115
|
+
const showChooser = !useAnother && accounts.length > 0;
|
|
100
116
|
const {
|
|
101
117
|
qrData,
|
|
102
118
|
qrPayload,
|
|
103
119
|
isLoading,
|
|
104
120
|
error,
|
|
105
121
|
isWaiting,
|
|
106
|
-
openAuthApproval,
|
|
107
122
|
openSameDeviceApproval,
|
|
108
123
|
retry
|
|
109
124
|
} = (0, _useOxyAuthSession.useOxyAuthSession)(oxyServices, clientId, handleWebSession, {
|
|
110
125
|
onSignedIn: hideSignInModal
|
|
111
126
|
});
|
|
112
127
|
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
const crossApexWeb = (0, _crossApex.isCrossApexWeb)();
|
|
128
|
+
// First-party password sign-in — the PRIMARY option once past the chooser.
|
|
129
|
+
const pw = (0, _usePasswordSignIn.usePasswordSignIn)({
|
|
130
|
+
onSignedIn: hideSignInModal
|
|
131
|
+
});
|
|
118
132
|
|
|
119
|
-
// Entrance animation.
|
|
133
|
+
// Entrance animation (respects reduced motion).
|
|
120
134
|
const opacity = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
121
135
|
const scale = (0, _reactNativeReanimated.useSharedValue)(0.96);
|
|
122
|
-
|
|
123
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: opacity/scale are Reanimated SharedValues (stable refs) and must not be listed as deps; this runs once on mount to play the entrance.
|
|
136
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: opacity/scale are Reanimated SharedValues (stable refs), not deps; runs once on mount.
|
|
124
137
|
(0, _react.useEffect)(() => {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
138
|
+
let cancelled = false;
|
|
139
|
+
_reactNative.AccessibilityInfo.isReduceMotionEnabled().then(reduced => {
|
|
140
|
+
if (cancelled) return;
|
|
141
|
+
const duration = reduced ? 0 : 250;
|
|
142
|
+
opacity.value = (0, _reactNativeReanimated.withTiming)(1, {
|
|
143
|
+
duration
|
|
144
|
+
});
|
|
145
|
+
scale.value = (0, _reactNativeReanimated.withTiming)(1, {
|
|
146
|
+
duration
|
|
147
|
+
});
|
|
130
148
|
});
|
|
149
|
+
return () => {
|
|
150
|
+
cancelled = true;
|
|
151
|
+
};
|
|
131
152
|
}, []);
|
|
132
153
|
const backdropStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
133
154
|
opacity: opacity.value
|
|
@@ -138,12 +159,32 @@ const SignInModalContent = ({
|
|
|
138
159
|
scale: scale.value
|
|
139
160
|
}]
|
|
140
161
|
}));
|
|
141
|
-
const handleClose = (0, _react.useCallback)(() =>
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
162
|
+
const handleClose = (0, _react.useCallback)(() => hideSignInModal(), []);
|
|
163
|
+
const handleCreateAccount = (0, _react.useCallback)(() => _reactNative.Linking.openURL(_useOxyAuthSession.OXY_ACCOUNTS_WEB_URL), []);
|
|
164
|
+
const handleSelectAccount = (0, _react.useCallback)(async account => {
|
|
165
|
+
// The active account is already signed in — selecting it just continues.
|
|
166
|
+
if (account.isCurrent) {
|
|
167
|
+
hideSignInModal();
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (switchingId) return;
|
|
171
|
+
setSwitchingId(account.accountId);
|
|
172
|
+
try {
|
|
173
|
+
await switchToAccount(account.accountId);
|
|
174
|
+
hideSignInModal();
|
|
175
|
+
} catch (switchError) {
|
|
176
|
+
if ((0, _core.isDev)()) {
|
|
177
|
+
_core.logger.warn('SignInModal: switch account failed', {
|
|
178
|
+
component: 'SignInModal'
|
|
179
|
+
}, switchError);
|
|
180
|
+
}
|
|
181
|
+
_bloom.toast.error(t('accountSwitcher.toasts.switchFailed') || 'Failed to switch account');
|
|
182
|
+
} finally {
|
|
183
|
+
setSwitchingId(null);
|
|
184
|
+
}
|
|
185
|
+
}, [switchingId, switchToAccount, t]);
|
|
186
|
+
const title = showChooser ? t('signin.chooser.title') : 'Sign in to Oxy';
|
|
187
|
+
const subtitle = showChooser ? t('signin.chooser.subtitle') : 'Continue with your Oxy identity to sign in securely.';
|
|
147
188
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
|
|
148
189
|
visible: true,
|
|
149
190
|
transparent: true,
|
|
@@ -161,7 +202,7 @@ const SignInModalContent = ({
|
|
|
161
202
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
162
203
|
style: [styles.card, {
|
|
163
204
|
backgroundColor: theme.colors.card,
|
|
164
|
-
paddingTop: insets.top +
|
|
205
|
+
paddingTop: insets.top + 28,
|
|
165
206
|
paddingBottom: insets.bottom + 24
|
|
166
207
|
}, contentStyle],
|
|
167
208
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
@@ -171,72 +212,159 @@ const SignInModalContent = ({
|
|
|
171
212
|
onPress: handleClose,
|
|
172
213
|
accessibilityRole: "button",
|
|
173
214
|
accessibilityLabel: "Close sign in",
|
|
174
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
children: "\xD7"
|
|
215
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
216
|
+
name: "close",
|
|
217
|
+
size: 22,
|
|
218
|
+
color: theme.colors.textSecondary
|
|
179
219
|
})
|
|
180
220
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
181
221
|
style: styles.header,
|
|
182
222
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyLogo.default, {
|
|
183
223
|
variant: "icon",
|
|
184
|
-
size:
|
|
224
|
+
size: 52
|
|
185
225
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
186
226
|
className: "text-foreground",
|
|
187
227
|
style: styles.title,
|
|
188
|
-
children:
|
|
228
|
+
children: title
|
|
189
229
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
190
230
|
className: "text-muted-foreground",
|
|
191
231
|
style: styles.subtitle,
|
|
192
|
-
children:
|
|
232
|
+
children: subtitle
|
|
193
233
|
})]
|
|
194
|
-
}),
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
234
|
+
}), showChooser ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
235
|
+
entering: _reactNativeReanimated.FadeIn.duration(180),
|
|
236
|
+
style: styles.phase,
|
|
237
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SignInAccountChooser.default, {
|
|
238
|
+
accounts: accounts,
|
|
239
|
+
onSelectAccount: handleSelectAccount,
|
|
240
|
+
onUseAnother: () => setUseAnother(true),
|
|
241
|
+
pendingAccountId: switchingId,
|
|
242
|
+
disabled: switchingId !== null
|
|
243
|
+
})
|
|
244
|
+
}, "chooser") : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
245
|
+
entering: _reactNativeReanimated.FadeIn.duration(180),
|
|
246
|
+
style: styles.phase,
|
|
247
|
+
children: [accounts.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
248
|
+
onPress: () => setUseAnother(false),
|
|
249
|
+
accessibilityRole: "button",
|
|
250
|
+
style: styles.backRow,
|
|
251
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
252
|
+
name: "chevron-back",
|
|
253
|
+
size: 18,
|
|
254
|
+
color: theme.colors.textSecondary
|
|
255
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
256
|
+
style: [styles.backText, {
|
|
257
|
+
color: theme.colors.textSecondary
|
|
258
|
+
}],
|
|
259
|
+
children: t('signin.chooser.title')
|
|
260
|
+
})]
|
|
261
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
262
|
+
style: styles.form,
|
|
263
|
+
children: [pw.step === 'identifier' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
264
|
+
style: [styles.input, {
|
|
265
|
+
borderColor: theme.colors.border,
|
|
266
|
+
color: theme.colors.text,
|
|
267
|
+
backgroundColor: theme.colors.backgroundSecondary
|
|
268
|
+
}],
|
|
269
|
+
value: pw.identifier,
|
|
270
|
+
onChangeText: pw.setIdentifier,
|
|
271
|
+
onSubmitEditing: pw.submitIdentifier,
|
|
272
|
+
placeholder: "Username or email",
|
|
273
|
+
placeholderTextColor: theme.colors.textSecondary,
|
|
274
|
+
autoCapitalize: "none",
|
|
275
|
+
autoCorrect: false,
|
|
276
|
+
keyboardType: "email-address",
|
|
277
|
+
returnKeyType: "next",
|
|
278
|
+
accessibilityLabel: "Username or email"
|
|
279
|
+
}), pw.step === 'password' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
280
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
281
|
+
style: [styles.contextText, {
|
|
282
|
+
color: theme.colors.textSecondary
|
|
283
|
+
}],
|
|
284
|
+
children: pw.identifier
|
|
285
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
286
|
+
style: [styles.input, {
|
|
287
|
+
borderColor: theme.colors.border,
|
|
288
|
+
color: theme.colors.text,
|
|
289
|
+
backgroundColor: theme.colors.backgroundSecondary
|
|
290
|
+
}],
|
|
291
|
+
value: pw.password,
|
|
292
|
+
onChangeText: pw.setPassword,
|
|
293
|
+
onSubmitEditing: pw.submitPassword,
|
|
294
|
+
placeholder: "Password",
|
|
295
|
+
placeholderTextColor: theme.colors.textSecondary,
|
|
296
|
+
secureTextEntry: true,
|
|
297
|
+
autoCapitalize: "none",
|
|
298
|
+
autoCorrect: false,
|
|
299
|
+
returnKeyType: "go",
|
|
300
|
+
accessibilityLabel: "Password"
|
|
301
|
+
})]
|
|
302
|
+
}), pw.step === 'twoFactor' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
303
|
+
style: [styles.input, {
|
|
304
|
+
borderColor: theme.colors.border,
|
|
305
|
+
color: theme.colors.text,
|
|
306
|
+
backgroundColor: theme.colors.backgroundSecondary
|
|
307
|
+
}],
|
|
308
|
+
value: pw.code,
|
|
309
|
+
onChangeText: pw.setCode,
|
|
310
|
+
onSubmitEditing: pw.submitTwoFactor,
|
|
311
|
+
placeholder: pw.useBackupCode ? 'Backup code' : '6-digit code',
|
|
312
|
+
placeholderTextColor: theme.colors.textSecondary,
|
|
313
|
+
autoCapitalize: "none",
|
|
314
|
+
autoCorrect: false,
|
|
315
|
+
keyboardType: pw.useBackupCode ? 'default' : 'number-pad',
|
|
316
|
+
returnKeyType: "go",
|
|
317
|
+
accessibilityLabel: pw.useBackupCode ? 'Backup code' : 'Two-factor code'
|
|
318
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
319
|
+
variant: "primary",
|
|
320
|
+
onPress: pw.step === 'identifier' ? pw.submitIdentifier : pw.step === 'password' ? pw.submitPassword : pw.submitTwoFactor,
|
|
321
|
+
loading: pw.isSubmitting,
|
|
322
|
+
disabled: pw.isSubmitting,
|
|
323
|
+
style: styles.primaryButton,
|
|
324
|
+
children: pw.step === 'identifier' ? 'Continue' : pw.step === 'password' ? 'Sign in' : 'Verify'
|
|
325
|
+
}), pw.error && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
326
|
+
className: "text-destructive",
|
|
327
|
+
style: styles.formError,
|
|
328
|
+
children: pw.error
|
|
329
|
+
}), pw.step === 'twoFactor' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
330
|
+
onPress: () => pw.setUseBackupCode(!pw.useBackupCode),
|
|
331
|
+
accessibilityRole: "button",
|
|
332
|
+
style: styles.linkButton,
|
|
333
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
334
|
+
style: [styles.linkText, {
|
|
335
|
+
color: theme.colors.primary
|
|
336
|
+
}],
|
|
337
|
+
children: pw.useBackupCode ? 'Use authenticator code' : 'Use a backup code'
|
|
338
|
+
})
|
|
339
|
+
}), pw.step !== 'identifier' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
340
|
+
onPress: pw.back,
|
|
341
|
+
accessibilityRole: "button",
|
|
342
|
+
style: styles.linkButton,
|
|
343
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
344
|
+
style: [styles.linkText, {
|
|
345
|
+
color: theme.colors.textSecondary
|
|
346
|
+
}],
|
|
347
|
+
children: "Back"
|
|
348
|
+
})
|
|
349
|
+
})]
|
|
350
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
351
|
+
style: styles.dividerRow,
|
|
352
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
353
|
+
style: [styles.dividerLine, {
|
|
354
|
+
backgroundColor: theme.colors.border
|
|
355
|
+
}]
|
|
356
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
357
|
+
style: [styles.dividerText, {
|
|
358
|
+
color: theme.colors.textSecondary
|
|
359
|
+
}],
|
|
360
|
+
children: "or"
|
|
361
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
362
|
+
style: [styles.dividerLine, {
|
|
363
|
+
backgroundColor: theme.colors.border
|
|
364
|
+
}]
|
|
365
|
+
})]
|
|
366
|
+
}), isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
367
|
+
style: styles.deviceLoading,
|
|
240
368
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
|
|
241
369
|
size: "small",
|
|
242
370
|
style: styles.statusSpinner
|
|
@@ -244,16 +372,52 @@ const SignInModalContent = ({
|
|
|
244
372
|
style: [styles.statusText, {
|
|
245
373
|
color: theme.colors.textSecondary
|
|
246
374
|
}],
|
|
247
|
-
children: "
|
|
375
|
+
children: "Preparing sign in\u2026"
|
|
376
|
+
})]
|
|
377
|
+
}) : error ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
378
|
+
style: styles.errorContainer,
|
|
379
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
380
|
+
className: "text-destructive",
|
|
381
|
+
style: styles.errorText,
|
|
382
|
+
children: error
|
|
383
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
384
|
+
variant: "secondary",
|
|
385
|
+
onPress: retry,
|
|
386
|
+
style: styles.secondaryButton,
|
|
387
|
+
children: "Try Again"
|
|
388
|
+
})]
|
|
389
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
390
|
+
children: [qrPayload && /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
391
|
+
variant: "secondary",
|
|
392
|
+
onPress: openSameDeviceApproval,
|
|
393
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyLogo.default, {
|
|
394
|
+
variant: "icon",
|
|
395
|
+
size: 20,
|
|
396
|
+
fillColor: theme.colors.text,
|
|
397
|
+
style: styles.buttonIcon
|
|
398
|
+
}),
|
|
399
|
+
style: styles.secondaryButton,
|
|
400
|
+
children: "Sign in with the Oxy app"
|
|
401
|
+
}), isWaiting && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
402
|
+
style: styles.statusContainer,
|
|
403
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
|
|
404
|
+
size: "small",
|
|
405
|
+
style: styles.statusSpinner
|
|
406
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
407
|
+
style: [styles.statusText, {
|
|
408
|
+
color: theme.colors.textSecondary
|
|
409
|
+
}],
|
|
410
|
+
children: "Waiting for authorization\u2026"
|
|
411
|
+
})]
|
|
412
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
413
|
+
style: styles.qrSection,
|
|
414
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AnotherDeviceQR.default, {
|
|
415
|
+
qrData: qrData,
|
|
416
|
+
qrPayload: qrPayload
|
|
417
|
+
})
|
|
248
418
|
})]
|
|
249
|
-
}), !crossApexWeb && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
250
|
-
style: styles.qrSection,
|
|
251
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AnotherDeviceQR.default, {
|
|
252
|
-
qrData: qrData,
|
|
253
|
-
qrPayload: qrPayload
|
|
254
|
-
})
|
|
255
419
|
})]
|
|
256
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
420
|
+
}, "signIn"), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
257
421
|
style: styles.footer,
|
|
258
422
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
259
423
|
style: styles.footerText,
|
|
@@ -281,42 +445,54 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
281
445
|
},
|
|
282
446
|
card: {
|
|
283
447
|
width: '100%',
|
|
284
|
-
maxWidth:
|
|
448
|
+
maxWidth: 420,
|
|
285
449
|
alignItems: 'center',
|
|
286
450
|
paddingHorizontal: 24,
|
|
287
|
-
borderRadius:
|
|
451
|
+
borderRadius: 28
|
|
288
452
|
},
|
|
289
453
|
closeButton: {
|
|
290
454
|
position: 'absolute',
|
|
291
455
|
top: 16,
|
|
292
456
|
right: 16,
|
|
293
|
-
width:
|
|
294
|
-
height:
|
|
295
|
-
borderRadius:
|
|
457
|
+
width: 36,
|
|
458
|
+
height: 36,
|
|
459
|
+
borderRadius: 18,
|
|
296
460
|
justifyContent: 'center',
|
|
297
461
|
alignItems: 'center',
|
|
298
462
|
zIndex: 10
|
|
299
463
|
},
|
|
300
|
-
closeButtonText: {
|
|
301
|
-
fontSize: 28,
|
|
302
|
-
fontWeight: '300',
|
|
303
|
-
lineHeight: 32
|
|
304
|
-
},
|
|
305
464
|
header: {
|
|
306
465
|
alignItems: 'center',
|
|
307
|
-
marginBottom:
|
|
466
|
+
marginBottom: 24
|
|
308
467
|
},
|
|
309
468
|
title: {
|
|
310
469
|
fontSize: 26,
|
|
311
|
-
fontWeight: '
|
|
470
|
+
fontWeight: '800',
|
|
471
|
+
letterSpacing: -0.5,
|
|
312
472
|
marginTop: 16,
|
|
313
473
|
textAlign: 'center'
|
|
314
474
|
},
|
|
315
475
|
subtitle: {
|
|
316
476
|
fontSize: 15,
|
|
477
|
+
lineHeight: 21,
|
|
317
478
|
marginTop: 8,
|
|
318
479
|
textAlign: 'center'
|
|
319
480
|
},
|
|
481
|
+
phase: {
|
|
482
|
+
width: '100%'
|
|
483
|
+
},
|
|
484
|
+
backRow: {
|
|
485
|
+
flexDirection: 'row',
|
|
486
|
+
alignItems: 'center',
|
|
487
|
+
gap: 4,
|
|
488
|
+
alignSelf: 'flex-start',
|
|
489
|
+
paddingVertical: 6,
|
|
490
|
+
marginBottom: 8
|
|
491
|
+
},
|
|
492
|
+
backText: {
|
|
493
|
+
fontSize: 14,
|
|
494
|
+
fontWeight: '600'
|
|
495
|
+
},
|
|
320
496
|
primaryButton: {
|
|
321
497
|
width: '100%',
|
|
322
498
|
borderRadius: 12
|
|
@@ -329,6 +505,57 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
329
505
|
buttonIcon: {
|
|
330
506
|
marginRight: 10
|
|
331
507
|
},
|
|
508
|
+
form: {
|
|
509
|
+
width: '100%'
|
|
510
|
+
},
|
|
511
|
+
input: {
|
|
512
|
+
width: '100%',
|
|
513
|
+
borderWidth: 1,
|
|
514
|
+
borderRadius: 12,
|
|
515
|
+
paddingHorizontal: 16,
|
|
516
|
+
paddingVertical: 13,
|
|
517
|
+
fontSize: 15,
|
|
518
|
+
marginBottom: 12
|
|
519
|
+
},
|
|
520
|
+
contextText: {
|
|
521
|
+
fontSize: 14,
|
|
522
|
+
textAlign: 'center',
|
|
523
|
+
marginBottom: 12
|
|
524
|
+
},
|
|
525
|
+
formError: {
|
|
526
|
+
fontSize: 14,
|
|
527
|
+
textAlign: 'center',
|
|
528
|
+
marginTop: 12
|
|
529
|
+
},
|
|
530
|
+
linkButton: {
|
|
531
|
+
alignSelf: 'center',
|
|
532
|
+
paddingVertical: 8,
|
|
533
|
+
marginTop: 8
|
|
534
|
+
},
|
|
535
|
+
linkText: {
|
|
536
|
+
fontSize: 14,
|
|
537
|
+
fontWeight: '600'
|
|
538
|
+
},
|
|
539
|
+
dividerRow: {
|
|
540
|
+
flexDirection: 'row',
|
|
541
|
+
alignItems: 'center',
|
|
542
|
+
width: '100%',
|
|
543
|
+
marginVertical: 20
|
|
544
|
+
},
|
|
545
|
+
dividerLine: {
|
|
546
|
+
flex: 1,
|
|
547
|
+
height: 1
|
|
548
|
+
},
|
|
549
|
+
dividerText: {
|
|
550
|
+
marginHorizontal: 12,
|
|
551
|
+
fontSize: 13
|
|
552
|
+
},
|
|
553
|
+
deviceLoading: {
|
|
554
|
+
flexDirection: 'row',
|
|
555
|
+
alignItems: 'center',
|
|
556
|
+
justifyContent: 'center',
|
|
557
|
+
paddingVertical: 12
|
|
558
|
+
},
|
|
332
559
|
statusContainer: {
|
|
333
560
|
flexDirection: 'row',
|
|
334
561
|
alignItems: 'center',
|
|
@@ -345,14 +572,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
345
572
|
width: '100%',
|
|
346
573
|
marginTop: 24
|
|
347
574
|
},
|
|
348
|
-
loadingContainer: {
|
|
349
|
-
alignItems: 'center',
|
|
350
|
-
paddingVertical: 40
|
|
351
|
-
},
|
|
352
|
-
loadingText: {
|
|
353
|
-
marginTop: 16,
|
|
354
|
-
fontSize: 14
|
|
355
|
-
},
|
|
356
575
|
errorContainer: {
|
|
357
576
|
alignItems: 'center',
|
|
358
577
|
paddingVertical: 20,
|