@oxy.so/services 13.10.0 → 13.11.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/ui/components/OxyDeviceSignIn.js +9 -6
- package/lib/commonjs/ui/components/OxyDeviceSignIn.js.map +1 -1
- package/lib/module/ui/components/OxyDeviceSignIn.js +9 -6
- package/lib/module/ui/components/OxyDeviceSignIn.js.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyDeviceSignIn.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/OxyDeviceSignIn.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyDeviceSignIn.d.ts +3 -2
- package/lib/typescript/module/ui/components/OxyDeviceSignIn.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/ui/components/OxyDeviceSignIn.tsx +9 -6
|
@@ -14,6 +14,7 @@ var _RiRefreshLine = require("@oxy.so/bloom/icons/RiRefreshLine");
|
|
|
14
14
|
var _loading = require("@oxy.so/bloom/loading");
|
|
15
15
|
var _theme = require("@oxy.so/bloom/theme");
|
|
16
16
|
var _typography = require("@oxy.so/bloom/typography");
|
|
17
|
+
var _session = require("@oxy.so/core/session");
|
|
17
18
|
var _oxyRuntimeContext = require("../context/oxyRuntimeContext.js");
|
|
18
19
|
var _useI18n = require("../hooks/useI18n.js");
|
|
19
20
|
var _accountDialogSnapshot = require("../hooks/accountDialogSnapshot.js");
|
|
@@ -43,8 +44,9 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
43
44
|
* beside a QR meant to be read from across a room.
|
|
44
45
|
*
|
|
45
46
|
* Anti-phishing: the plate encodes `signIn.approvalUrl` and the code line shows
|
|
46
|
-
* `signIn.authorizeCode
|
|
47
|
-
*
|
|
47
|
+
* `deviceComparisonCode(signIn.authorizeCode)` (`CE7F-B31F`), the same short
|
|
48
|
+
* code the approval page prints, both PUBLIC; nothing about the application is
|
|
49
|
+
* read out of either here. The secret `sessionToken` never leaves the controller.
|
|
48
50
|
*/
|
|
49
51
|
|
|
50
52
|
/** High-contrast, un-themed on purpose: scan reliability. */const QR_PLATE_BG = '#FFFFFF';
|
|
@@ -54,10 +56,11 @@ const DEFAULT_QR_SIZE = 280;
|
|
|
54
56
|
/** The quiet zone around the symbol, as a fraction of its size. */
|
|
55
57
|
const PLATE_PADDING_RATIO = 0.06;
|
|
56
58
|
/**
|
|
57
|
-
* The code and its hint, as fractions of the QR's edge:
|
|
58
|
-
* the default 280
|
|
59
|
+
* The code and its hint, as fractions of the QR's edge: 28 and 13 points at
|
|
60
|
+
* the default 280. The nine characters of `CE7F-B31F` then span about half the
|
|
61
|
+
* symbol, large enough to read from across a room.
|
|
59
62
|
*/
|
|
60
|
-
const CODE_SIZE_RATIO = 0.
|
|
63
|
+
const CODE_SIZE_RATIO = 0.1;
|
|
61
64
|
const CODE_HINT_SIZE_RATIO = 0.046;
|
|
62
65
|
const CODE_HINT_LINE_HEIGHT = 1.4;
|
|
63
66
|
const OxyDeviceSignIn = ({
|
|
@@ -154,7 +157,7 @@ const OxyDeviceSignIn = ({
|
|
|
154
157
|
style: {
|
|
155
158
|
fontSize: Math.round(size * CODE_SIZE_RATIO)
|
|
156
159
|
},
|
|
157
|
-
children: signIn.authorizeCode
|
|
160
|
+
children: (0, _session.deviceComparisonCode)(signIn.authorizeCode)
|
|
158
161
|
})]
|
|
159
162
|
}) : null]
|
|
160
163
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeQrcodeSvg","_interopRequireDefault","_button","_code","_RiCheckboxCircleLine","_RiRefreshLine","_loading","_theme","_typography","_oxyRuntimeContext","_useI18n","_accountDialogSnapshot","_jsxRuntime","e","__esModule","default","QR_PLATE_BG","QR_FOREGROUND","DEFAULT_QR_SIZE","PLATE_PADDING_RATIO","CODE_SIZE_RATIO","CODE_HINT_SIZE_RATIO","CODE_HINT_LINE_HEIGHT","OxyDeviceSignIn","size","theme","useTheme","t","useI18n","accountDialogController","controller","useOxy","signIn","useAccountDialogSnapshot","live","inline","phase","expired","failure","useEffect","current","getSnapshot","startInlineQr","last","cancelSignIn","padding","Math","round","showsCode","approvalUrl","progress","plate","jsx","RiCheckboxCircleLine","fill","colors","success","value","backgroundColor","color","SpinnerIcon","Button","appearance","tone","leadingIcon","RiRefreshLine","onPress","testID","children","jsxs","View","style","styles","block","width","height","authorizeCode","codeBlock","Text","codeHint","textSecondary","fontSize","lineHeight","Code","exports","StyleSheet","create","alignItems","gap","borderRadius","justifyContent","textAlign"],"sourceRoot":"../../../../src","sources":["ui/components/OxyDeviceSignIn.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeQrcodeSvg","_interopRequireDefault","_button","_code","_RiCheckboxCircleLine","_RiRefreshLine","_loading","_theme","_typography","_session","_oxyRuntimeContext","_useI18n","_accountDialogSnapshot","_jsxRuntime","e","__esModule","default","QR_PLATE_BG","QR_FOREGROUND","DEFAULT_QR_SIZE","PLATE_PADDING_RATIO","CODE_SIZE_RATIO","CODE_HINT_SIZE_RATIO","CODE_HINT_LINE_HEIGHT","OxyDeviceSignIn","size","theme","useTheme","t","useI18n","accountDialogController","controller","useOxy","signIn","useAccountDialogSnapshot","live","inline","phase","expired","failure","useEffect","current","getSnapshot","startInlineQr","last","cancelSignIn","padding","Math","round","showsCode","approvalUrl","progress","plate","jsx","RiCheckboxCircleLine","fill","colors","success","value","backgroundColor","color","SpinnerIcon","Button","appearance","tone","leadingIcon","RiRefreshLine","onPress","testID","children","jsxs","View","style","styles","block","width","height","authorizeCode","codeBlock","Text","codeHint","textSecondary","fontSize","lineHeight","Code","deviceComparisonCode","exports","StyleSheet","create","alignItems","gap","borderRadius","justifyContent","textAlign"],"sourceRoot":"../../../../src","sources":["ui/components/OxyDeviceSignIn.tsx"],"mappings":";;;;;;AA8BA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAA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AAgD,QAAA,EAEvD,IAAAgB,6BAAoB,EAACpD,MAAM,CAAC4C,aAAa;MAAC,CACvC,CAAC;IAAA,CACH,CAAC,GACL,IAAI;EAAA,CACJ,CAAC;AAEX,CAAC;AAACS,OAAA,CAAA9D,eAAA,GAAAA,eAAA;AAEF,MAAMiD,MAAM,GAAGc,uBAAU,CAACC,MAAM,CAAC;EAC/Bd,KAAK,EAAE;IACLe,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE;EACP,CAAC;EACDtC,KAAK,EAAE;IACLuC,YAAY,EAAE,EAAE;IAChBhC,eAAe,EAAE1C,WAAW;IAC5BwE,UAAU,EAAE,QAAQ;IACpBG,cAAc,EAAE;EAClB,CAAC;EACDd,SAAS,EAAE;IACTW,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE;EACP,CAAC;EACDV,QAAQ,EAAE;IACRa,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
* beside a QR meant to be read from across a room.
|
|
25
25
|
*
|
|
26
26
|
* Anti-phishing: the plate encodes `signIn.approvalUrl` and the code line shows
|
|
27
|
-
* `signIn.authorizeCode
|
|
28
|
-
*
|
|
27
|
+
* `deviceComparisonCode(signIn.authorizeCode)` (`CE7F-B31F`), the same short
|
|
28
|
+
* code the approval page prints, both PUBLIC; nothing about the application is
|
|
29
|
+
* read out of either here. The secret `sessionToken` never leaves the controller.
|
|
29
30
|
*/
|
|
30
31
|
|
|
31
32
|
import { useEffect } from 'react';
|
|
@@ -38,6 +39,7 @@ import { RiRefreshLine } from '@oxy.so/bloom/icons/RiRefreshLine';
|
|
|
38
39
|
import { SpinnerIcon } from '@oxy.so/bloom/loading';
|
|
39
40
|
import { useTheme } from '@oxy.so/bloom/theme';
|
|
40
41
|
import { Text } from '@oxy.so/bloom/typography';
|
|
42
|
+
import { deviceComparisonCode } from '@oxy.so/core/session';
|
|
41
43
|
import { useOxy } from "../context/oxyRuntimeContext.js";
|
|
42
44
|
import { useI18n } from "../hooks/useI18n.js";
|
|
43
45
|
import { useAccountDialogSnapshot } from "../hooks/accountDialogSnapshot.js";
|
|
@@ -51,10 +53,11 @@ const DEFAULT_QR_SIZE = 280;
|
|
|
51
53
|
/** The quiet zone around the symbol, as a fraction of its size. */
|
|
52
54
|
const PLATE_PADDING_RATIO = 0.06;
|
|
53
55
|
/**
|
|
54
|
-
* The code and its hint, as fractions of the QR's edge:
|
|
55
|
-
* the default 280
|
|
56
|
+
* The code and its hint, as fractions of the QR's edge: 28 and 13 points at
|
|
57
|
+
* the default 280. The nine characters of `CE7F-B31F` then span about half the
|
|
58
|
+
* symbol, large enough to read from across a room.
|
|
56
59
|
*/
|
|
57
|
-
const CODE_SIZE_RATIO = 0.
|
|
60
|
+
const CODE_SIZE_RATIO = 0.1;
|
|
58
61
|
const CODE_HINT_SIZE_RATIO = 0.046;
|
|
59
62
|
const CODE_HINT_LINE_HEIGHT = 1.4;
|
|
60
63
|
export const OxyDeviceSignIn = ({
|
|
@@ -151,7 +154,7 @@ export const OxyDeviceSignIn = ({
|
|
|
151
154
|
style: {
|
|
152
155
|
fontSize: Math.round(size * CODE_SIZE_RATIO)
|
|
153
156
|
},
|
|
154
|
-
children: signIn.authorizeCode
|
|
157
|
+
children: deviceComparisonCode(signIn.authorizeCode)
|
|
155
158
|
})]
|
|
156
159
|
}) : null]
|
|
157
160
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","StyleSheet","View","QRCode","Button","Code","RiCheckboxCircleLine","RiRefreshLine","SpinnerIcon","useTheme","Text","useOxy","useI18n","useAccountDialogSnapshot","jsx","_jsx","jsxs","_jsxs","QR_PLATE_BG","QR_FOREGROUND","DEFAULT_QR_SIZE","PLATE_PADDING_RATIO","CODE_SIZE_RATIO","CODE_HINT_SIZE_RATIO","CODE_HINT_LINE_HEIGHT","OxyDeviceSignIn","size","theme","t","accountDialogController","controller","signIn","live","inline","phase","expired","failure","current","getSnapshot","startInlineQr","last","cancelSignIn","padding","Math","round","showsCode","approvalUrl","progress","plate","fill","colors","success","value","backgroundColor","color","appearance","tone","leadingIcon","onPress","testID","children","style","styles","block","width","height","authorizeCode","codeBlock","codeHint","textSecondary","fontSize","lineHeight","create","alignItems","gap","borderRadius","justifyContent","textAlign"],"sourceRoot":"../../../../src","sources":["ui/components/OxyDeviceSignIn.tsx"],"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;;AAGA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,MAAM,MAAM,yBAAyB;AAC5C,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,oBAAoB,QAAQ,0CAA0C;AAC/E,SAASC,aAAa,QAAQ,mCAAmC;AACjE,SAASC,WAAW,QAAQ,uBAAuB;AACnD,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,IAAI,QAAQ,0BAA0B;AAC/C,SAASC,MAAM,QAAQ,iCAA8B;AACrD,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,SAASC,wBAAwB,QAAQ,mCAAgC;;AAEzE;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,MAAMC,WAAW,GAAG,SAAS;AAC7B,MAAMC,aAAa,GAAG,SAAS;AAC/B;AACA,MAAMC,eAAe,GAAG,GAAG;AAC3B;AACA,MAAMC,mBAAmB,GAAG,IAAI;AAChC;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAG,
|
|
1
|
+
{"version":3,"names":["useEffect","StyleSheet","View","QRCode","Button","Code","RiCheckboxCircleLine","RiRefreshLine","SpinnerIcon","useTheme","Text","deviceComparisonCode","useOxy","useI18n","useAccountDialogSnapshot","jsx","_jsx","jsxs","_jsxs","QR_PLATE_BG","QR_FOREGROUND","DEFAULT_QR_SIZE","PLATE_PADDING_RATIO","CODE_SIZE_RATIO","CODE_HINT_SIZE_RATIO","CODE_HINT_LINE_HEIGHT","OxyDeviceSignIn","size","theme","t","accountDialogController","controller","signIn","live","inline","phase","expired","failure","current","getSnapshot","startInlineQr","last","cancelSignIn","padding","Math","round","showsCode","approvalUrl","progress","plate","fill","colors","success","value","backgroundColor","color","appearance","tone","leadingIcon","onPress","testID","children","style","styles","block","width","height","authorizeCode","codeBlock","codeHint","textSecondary","fontSize","lineHeight","create","alignItems","gap","borderRadius","justifyContent","textAlign"],"sourceRoot":"../../../../src","sources":["ui/components/OxyDeviceSignIn.tsx"],"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;;AAGA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,MAAM,MAAM,yBAAyB;AAC5C,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,oBAAoB,QAAQ,0CAA0C;AAC/E,SAASC,aAAa,QAAQ,mCAAmC;AACjE,SAASC,WAAW,QAAQ,uBAAuB;AACnD,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,IAAI,QAAQ,0BAA0B;AAC/C,SAASC,oBAAoB,QAAQ,sBAAsB;AAC3D,SAASC,MAAM,QAAQ,iCAA8B;AACrD,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,SAASC,wBAAwB,QAAQ,mCAAgC;;AAEzE;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,MAAMC,WAAW,GAAG,SAAS;AAC7B,MAAMC,aAAa,G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,CAACX,IAAI;QACHuD,MAAM,EAAC,qBAAqB;QAC5BE,KAAK,EAAE;UAAES,QAAQ,EAAE3B,IAAI,CAACC,KAAK,CAAClB,IAAI,GAAGJ,eAAe;QAAE,CAAE;QAAAsC,QAAA,EAEvDlD,oBAAoB,CAACqB,MAAM,CAACmC,aAAa;MAAC,CACvC,CAAC;IAAA,CACH,CAAC,GACL,IAAI;EAAA,CACJ,CAAC;AAEX,CAAC;AAED,MAAMJ,MAAM,GAAG9D,UAAU,CAACwE,MAAM,CAAC;EAC/BT,KAAK,EAAE;IACLU,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE;EACP,CAAC;EACD1B,KAAK,EAAE;IACL2B,YAAY,EAAE,EAAE;IAChBtB,eAAe,EAAEnC,WAAW;IAC5BuD,UAAU,EAAE,QAAQ;IACpBG,cAAc,EAAE;EAClB,CAAC;EACDT,SAAS,EAAE;IACTM,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE;EACP,CAAC;EACDN,QAAQ,EAAE;IACRS,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -22,8 +22,9 @@
|
|
|
22
22
|
* beside a QR meant to be read from across a room.
|
|
23
23
|
*
|
|
24
24
|
* Anti-phishing: the plate encodes `signIn.approvalUrl` and the code line shows
|
|
25
|
-
* `signIn.authorizeCode
|
|
26
|
-
*
|
|
25
|
+
* `deviceComparisonCode(signIn.authorizeCode)` (`CE7F-B31F`), the same short
|
|
26
|
+
* code the approval page prints, both PUBLIC; nothing about the application is
|
|
27
|
+
* read out of either here. The secret `sessionToken` never leaves the controller.
|
|
27
28
|
*/
|
|
28
29
|
import type React from 'react';
|
|
29
30
|
export interface OxyDeviceSignInProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyDeviceSignIn.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyDeviceSignIn.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OxyDeviceSignIn.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyDeviceSignIn.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgC/B,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4F1D,CAAC"}
|
|
@@ -22,8 +22,9 @@
|
|
|
22
22
|
* beside a QR meant to be read from across a room.
|
|
23
23
|
*
|
|
24
24
|
* Anti-phishing: the plate encodes `signIn.approvalUrl` and the code line shows
|
|
25
|
-
* `signIn.authorizeCode
|
|
26
|
-
*
|
|
25
|
+
* `deviceComparisonCode(signIn.authorizeCode)` (`CE7F-B31F`), the same short
|
|
26
|
+
* code the approval page prints, both PUBLIC; nothing about the application is
|
|
27
|
+
* read out of either here. The secret `sessionToken` never leaves the controller.
|
|
27
28
|
*/
|
|
28
29
|
import type React from 'react';
|
|
29
30
|
export interface OxyDeviceSignInProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyDeviceSignIn.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyDeviceSignIn.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OxyDeviceSignIn.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyDeviceSignIn.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgC/B,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4F1D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/services",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.11.0",
|
|
4
4
|
"description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"@commitlint/config-conventional": "^21.2.0",
|
|
162
162
|
"@expo/app-integrity": "~58.0.2",
|
|
163
163
|
"@expo/vector-icons": "^15.0.3",
|
|
164
|
-
"@oxy.so/core": "7.
|
|
164
|
+
"@oxy.so/core": "7.9.0",
|
|
165
165
|
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
166
166
|
"@react-native-community/netinfo": "^12.0.1",
|
|
167
167
|
"@react-native/babel-preset": "^0.88.0",
|
|
@@ -211,13 +211,13 @@
|
|
|
211
211
|
"expo-video": "~58.0.12"
|
|
212
212
|
},
|
|
213
213
|
"//@oxy.so/bloom": "Bloom 11.1.0 adds the shared grouped sections, usage card, subscription plans, frame appearance and overlay navigation APIs used by this SDK. First-party Bloom peers remain open above this tested minimum.",
|
|
214
|
-
"//@oxy.so/core": "Core 7.8.0 supplies the device sign-in request's `approvalUrl` and the `signin.device.*` strings `OxyDeviceSignIn` shows; 7.7.0 supplies the bounded native asset file adapter and phase progress installed by OxyProvider; 7.6.0 forwards guest locale and first-touch campaign metadata through signup; 7.3.0 supplies `users.lookupMany`, with which the account members screen fails (and retries) a profile read whose chunk failed instead of caching those members as handle-less; 7.2.0 supplies `assets.cachedUrl`, with which `useFileDownloadUrl` answers an already-resolved URL in its first render; 6.16.0 supplies `requireServerVerdict` and `onHolderRejected`, with which the cold boot checks a session it painted from the cache; 6.13.0 supplies the `accounts.settings.*` strings (picture, categories) the account settings speak in every language; 6.12.0 supplies `fileManagement.contentLost` and the `lost` file status a lost file is listed with; 6.11.0 supplies the `follow.errors.*` strings the follow error codes are worded with; 6.4.0 the `follow.*` strings the follow buttons read for every verb and language; 6.1.0 the `oxy.auth.email.{startChange,change,remove}` and `oxy.auth.password.remove` the sign-in & security panels call. Keep one Core instance per app; raise this floor with the root catalogue when new runtime APIs are required.",
|
|
214
|
+
"//@oxy.so/core": "Core 7.9.0 supplies `deviceComparisonCode`, the short code `OxyDeviceSignIn` prints; 7.8.0 supplies the device sign-in request's `approvalUrl` and the `signin.device.*` strings `OxyDeviceSignIn` shows; 7.7.0 supplies the bounded native asset file adapter and phase progress installed by OxyProvider; 7.6.0 forwards guest locale and first-touch campaign metadata through signup; 7.3.0 supplies `users.lookupMany`, with which the account members screen fails (and retries) a profile read whose chunk failed instead of caching those members as handle-less; 7.2.0 supplies `assets.cachedUrl`, with which `useFileDownloadUrl` answers an already-resolved URL in its first render; 6.16.0 supplies `requireServerVerdict` and `onHolderRejected`, with which the cold boot checks a session it painted from the cache; 6.13.0 supplies the `accounts.settings.*` strings (picture, categories) the account settings speak in every language; 6.12.0 supplies `fileManagement.contentLost` and the `lost` file status a lost file is listed with; 6.11.0 supplies the `follow.errors.*` strings the follow error codes are worded with; 6.4.0 the `follow.*` strings the follow buttons read for every verb and language; 6.1.0 the `oxy.auth.email.{startChange,change,remove}` and `oxy.auth.password.remove` the sign-in & security panels call. Keep one Core instance per app; raise this floor with the root catalogue when new runtime APIs are required.",
|
|
215
215
|
"//react-native": "React Native 0.81 to 0.88, React 19.1+ and Expo SDK 54 to 58. The floors are the Expo SDK 54 stack (react-native 0.81.6, react 19.1.4, react-native-web 0.21.4, expo 54.0.38 and the module versions its bundledNativeModules.json pins), which compat/expo-54 installs as an external consumer and checks on every CI run (`bun check.mjs`): every peer here admits that stack, services' published src typechecks against its types, and <OxyProvider> mounts and settles its cold boot on iOS (React Native 0.81), web (react-native-web 0.21) and react-native-macos 0.81 with the native modules macOS lacks absent. Astro, Oxy's browser, runs react-native-macos 0.81 (0.83 is its latest release), which is why the floor is not 0.85. The SDK 56 floors these replaced were the versions current when the ranges were first written, not measurements.",
|
|
216
216
|
"peerDependencies": {
|
|
217
217
|
"@expo/app-integrity": ">=0.1.10 <59.0.0",
|
|
218
218
|
"@expo/vector-icons": "^15.0.3",
|
|
219
219
|
"@oxy.so/bloom": ">=11.1.0",
|
|
220
|
-
"@oxy.so/core": "^7.
|
|
220
|
+
"@oxy.so/core": "^7.9.0",
|
|
221
221
|
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
222
222
|
"@react-native-community/netinfo": ">=11.4.1 <13.0.0",
|
|
223
223
|
"@tanstack/query-async-storage-persister": "^5.101",
|
|
@@ -22,8 +22,9 @@
|
|
|
22
22
|
* beside a QR meant to be read from across a room.
|
|
23
23
|
*
|
|
24
24
|
* Anti-phishing: the plate encodes `signIn.approvalUrl` and the code line shows
|
|
25
|
-
* `signIn.authorizeCode
|
|
26
|
-
*
|
|
25
|
+
* `deviceComparisonCode(signIn.authorizeCode)` (`CE7F-B31F`), the same short
|
|
26
|
+
* code the approval page prints, both PUBLIC; nothing about the application is
|
|
27
|
+
* read out of either here. The secret `sessionToken` never leaves the controller.
|
|
27
28
|
*/
|
|
28
29
|
|
|
29
30
|
import type React from 'react';
|
|
@@ -37,6 +38,7 @@ import { RiRefreshLine } from '@oxy.so/bloom/icons/RiRefreshLine';
|
|
|
37
38
|
import { SpinnerIcon } from '@oxy.so/bloom/loading';
|
|
38
39
|
import { useTheme } from '@oxy.so/bloom/theme';
|
|
39
40
|
import { Text } from '@oxy.so/bloom/typography';
|
|
41
|
+
import { deviceComparisonCode } from '@oxy.so/core/session';
|
|
40
42
|
import { useOxy } from '../context/oxyRuntimeContext';
|
|
41
43
|
import { useI18n } from '../hooks/useI18n';
|
|
42
44
|
import { useAccountDialogSnapshot } from '../hooks/accountDialogSnapshot';
|
|
@@ -49,10 +51,11 @@ const DEFAULT_QR_SIZE = 280;
|
|
|
49
51
|
/** The quiet zone around the symbol, as a fraction of its size. */
|
|
50
52
|
const PLATE_PADDING_RATIO = 0.06;
|
|
51
53
|
/**
|
|
52
|
-
* The code and its hint, as fractions of the QR's edge:
|
|
53
|
-
* the default 280
|
|
54
|
+
* The code and its hint, as fractions of the QR's edge: 28 and 13 points at
|
|
55
|
+
* the default 280. The nine characters of `CE7F-B31F` then span about half the
|
|
56
|
+
* symbol, large enough to read from across a room.
|
|
54
57
|
*/
|
|
55
|
-
const CODE_SIZE_RATIO = 0.
|
|
58
|
+
const CODE_SIZE_RATIO = 0.1;
|
|
56
59
|
const CODE_HINT_SIZE_RATIO = 0.046;
|
|
57
60
|
const CODE_HINT_LINE_HEIGHT = 1.4;
|
|
58
61
|
|
|
@@ -147,7 +150,7 @@ export const OxyDeviceSignIn: React.FC<OxyDeviceSignInProps> = ({ size = DEFAULT
|
|
|
147
150
|
testID="device-sign-in-code"
|
|
148
151
|
style={{ fontSize: Math.round(size * CODE_SIZE_RATIO) }}
|
|
149
152
|
>
|
|
150
|
-
{signIn.authorizeCode}
|
|
153
|
+
{deviceComparisonCode(signIn.authorizeCode)}
|
|
151
154
|
</Code>
|
|
152
155
|
</View>
|
|
153
156
|
) : null}
|