@oxy.so/services 14.15.1 → 14.16.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 +18 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/setupFlow/OxySetupFlow.js +272 -0
- package/lib/commonjs/ui/components/setupFlow/OxySetupFlow.js.map +1 -0
- package/lib/commonjs/ui/components/setupFlow/oxySignInStep.js +34 -0
- package/lib/commonjs/ui/components/setupFlow/oxySignInStep.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyAuthScreen.js +21 -7
- package/lib/commonjs/ui/components/signIn/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js +27 -2
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js +3 -1
- package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/ReauthStep.js +21 -0
- package/lib/commonjs/ui/components/signIn/ReauthStep.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +18 -5
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/session/deviceCredentialTracker.js +4 -2
- package/lib/commonjs/ui/session/deviceCredentialTracker.js.map +1 -1
- package/lib/commonjs/ui/session/setupSignIn.js +6 -0
- package/lib/commonjs/ui/session/setupSignIn.js.map +1 -0
- package/lib/module/index.js +5 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/setupFlow/OxySetupFlow.js +269 -0
- package/lib/module/ui/components/setupFlow/OxySetupFlow.js.map +1 -0
- package/lib/module/ui/components/setupFlow/oxySignInStep.js +29 -0
- package/lib/module/ui/components/setupFlow/oxySignInStep.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyAuthScreen.js +22 -8
- package/lib/module/ui/components/signIn/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/components/signIn/OxySignInPanel.js +27 -2
- package/lib/module/ui/components/signIn/OxySignInPanel.js.map +1 -1
- package/lib/module/ui/components/signIn/OxySignUpPanel.js +3 -1
- package/lib/module/ui/components/signIn/OxySignUpPanel.js.map +1 -1
- package/lib/module/ui/components/signIn/ReauthStep.js +22 -1
- package/lib/module/ui/components/signIn/ReauthStep.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +18 -5
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/session/deviceCredentialTracker.js +4 -2
- package/lib/module/ui/session/deviceCredentialTracker.js.map +1 -1
- package/lib/module/ui/session/setupSignIn.js +4 -0
- package/lib/module/ui/session/setupSignIn.js.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +5 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/setupFlow/OxySetupFlow.d.ts +88 -0
- package/lib/typescript/commonjs/ui/components/setupFlow/OxySetupFlow.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/setupFlow/oxySignInStep.d.ts +23 -0
- package/lib/typescript/commonjs/ui/components/setupFlow/oxySignInStep.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyAuthScreen.d.ts +12 -3
- package/lib/typescript/commonjs/ui/components/signIn/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/ReauthStep.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/signIn/ReauthStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +10 -3
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts +1 -1
- package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts +1 -1
- package/lib/typescript/commonjs/ui/session/deviceCredentialTracker.d.ts +3 -12
- package/lib/typescript/commonjs/ui/session/deviceCredentialTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/setupSignIn.d.ts +38 -0
- package/lib/typescript/commonjs/ui/session/setupSignIn.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +7 -3
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +5 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/setupFlow/OxySetupFlow.d.ts +88 -0
- package/lib/typescript/module/ui/components/setupFlow/OxySetupFlow.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/setupFlow/oxySignInStep.d.ts +23 -0
- package/lib/typescript/module/ui/components/setupFlow/oxySignInStep.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyAuthScreen.d.ts +12 -3
- package/lib/typescript/module/ui/components/signIn/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/ReauthStep.d.ts +2 -1
- package/lib/typescript/module/ui/components/signIn/ReauthStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +10 -3
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/Ionicons.d.ts +1 -1
- package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts +1 -1
- package/lib/typescript/module/ui/session/deviceCredentialTracker.d.ts +3 -12
- package/lib/typescript/module/ui/session/deviceCredentialTracker.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/setupSignIn.d.ts +38 -0
- package/lib/typescript/module/ui/session/setupSignIn.d.ts.map +1 -0
- package/lib/typescript/module/ui/types/navigation.d.ts +7 -3
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +17 -0
- package/src/ui/components/setupFlow/OxySetupFlow.tsx +339 -0
- package/src/ui/components/setupFlow/__tests__/OxySetupFlow.test.tsx +312 -0
- package/src/ui/components/setupFlow/oxySignInStep.tsx +32 -0
- package/src/ui/components/signIn/OxyAuthScreen.tsx +30 -7
- package/src/ui/components/signIn/OxySignInPanel.tsx +22 -2
- package/src/ui/components/signIn/OxySignUpPanel.tsx +1 -1
- package/src/ui/components/signIn/ReauthStep.tsx +26 -1
- package/src/ui/context/OxyContext.tsx +26 -5
- package/src/ui/context/oxyContextTypes.ts +11 -3
- package/src/ui/session/deviceCredentialTracker.ts +10 -5
- package/src/ui/session/setupSignIn.ts +41 -0
- package/src/ui/types/navigation.ts +7 -3
package/lib/commonjs/index.js
CHANGED
|
@@ -195,6 +195,12 @@ Object.defineProperty(exports, "OxyRuntimeMissingError", {
|
|
|
195
195
|
return _index.OxyRuntimeMissingError;
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
|
+
Object.defineProperty(exports, "OxySetupFlow", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
get: function () {
|
|
201
|
+
return _OxySetupFlow.OxySetupFlow;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
198
204
|
Object.defineProperty(exports, "OxySignInButton", {
|
|
199
205
|
enumerable: true,
|
|
200
206
|
get: function () {
|
|
@@ -435,6 +441,12 @@ Object.defineProperty(exports, "openOAuthPopup", {
|
|
|
435
441
|
return _oauthPopup.openOAuthPopup;
|
|
436
442
|
}
|
|
437
443
|
});
|
|
444
|
+
Object.defineProperty(exports, "oxySignInStep", {
|
|
445
|
+
enumerable: true,
|
|
446
|
+
get: function () {
|
|
447
|
+
return _oxySignInStep.oxySignInStep;
|
|
448
|
+
}
|
|
449
|
+
});
|
|
438
450
|
Object.defineProperty(exports, "queryKeys", {
|
|
439
451
|
enumerable: true,
|
|
440
452
|
get: function () {
|
|
@@ -981,6 +993,8 @@ var _LogoText = require("./ui/components/logo/LogoText.js");
|
|
|
981
993
|
var _ProfileButton = _interopRequireDefault(require("./ui/components/ProfileButton.js"));
|
|
982
994
|
var _OxyAuthChooser = _interopRequireDefault(require("./ui/components/OxyAuthChooser.js"));
|
|
983
995
|
var _OxySurfaceFrame = require("./ui/components/OxySurfaceFrame.js");
|
|
996
|
+
var _OxySetupFlow = require("./ui/components/setupFlow/OxySetupFlow.js");
|
|
997
|
+
var _oxySignInStep = require("./ui/components/setupFlow/oxySignInStep.js");
|
|
984
998
|
var _OxySignInPanel = require("./ui/components/signIn/OxySignInPanel.js");
|
|
985
999
|
var _OxySignUpPanel = require("./ui/components/signIn/OxySignUpPanel.js");
|
|
986
1000
|
var _OxyAccountPicker = require("./ui/components/signIn/OxyAccountPicker.js");
|
|
@@ -1157,6 +1171,10 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
1157
1171
|
// for a platform that shows it on a card of its own (OxyOS's login screen), its
|
|
1158
1172
|
// card sized by the chooser through `OxySurfaceFrame`.
|
|
1159
1173
|
|
|
1174
|
+
// A platform's setup in the sign-in's own frame: the host's steps and the SDK's
|
|
1175
|
+
// sign-in (`oxySignInStep`, the chooser above unchanged) on one card, controlled
|
|
1176
|
+
// by the host (ADR 0064; OxyOS's login screen sets up an account with it).
|
|
1177
|
+
|
|
1160
1178
|
// THE sign-in screens. The account dialog renders them, and so does every page
|
|
1161
1179
|
// of the auth.oxy.so IdP: one implementation of what a person sees when they
|
|
1162
1180
|
// sign in, create an account, or choose which account continues.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["require","_routes","_screenComponents","_OxyProvider","_interopRequireDefault","_OxyContext","_index","_useAuth","_AppAssertionContext","_productAnalytics","_identityBinding","_hostSession","_authStore","_assetStore","_useAssets","_useFileDownloadUrl","_useFollow","_useStorage","_useAccountQueries","_useServicesQueries","_useSecurityQueries","_useAuthMethods","_usePaymentQueries","_useAccountMutations","_useServicesMutations","_mutationFactory","_mutationKeys","_queryKeys","_userCache","_useMutationStatus","_useOnlineStatus","_useOxyEvent","_errorHandlers","_useFileFiltering","_core","_OxySignInButton","_OxyDeviceSignIn","_oauthPopup","_OxyAuthPrompt","_OxyOAuthCallback","_OxyConsentScreen","_RequireOxyAuth","_FollowButton","_FollowTargetButton","_followRules","_followLabels","_useFollowTarget","_followTargetStore","_PeableButton","_OxyPayButton","_LogoIcon","_LogoText","_ProfileButton","_OxyAuthChooser","_OxySurfaceFrame","_OxySignInPanel","_OxySignUpPanel","_OxyAccountPicker","_OxySignInSecurityPanel","_OxyEmailPanel","_OxyDeleteAccountPanel","_OxyLinkCommonsPanel","_OxyPasswordPanel","_OxyAuthenticatorPanel","_OxyAuthScreen","_OxySignInRequestSurface","_useDeviceSwitcher","_bottomSheetManager","_useSurfaceHeader","_SurfaceHeaderAction","_accountDialogManager","_usePersonalPlans","_AccountInvitationAcceptance","_DisplayCurrencySelector","_useDisplayCurrency","_useDisplayPrice","e","__esModule","default","registerScreens","screenComponents"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["require","_routes","_screenComponents","_OxyProvider","_interopRequireDefault","_OxyContext","_index","_useAuth","_AppAssertionContext","_productAnalytics","_identityBinding","_hostSession","_authStore","_assetStore","_useAssets","_useFileDownloadUrl","_useFollow","_useStorage","_useAccountQueries","_useServicesQueries","_useSecurityQueries","_useAuthMethods","_usePaymentQueries","_useAccountMutations","_useServicesMutations","_mutationFactory","_mutationKeys","_queryKeys","_userCache","_useMutationStatus","_useOnlineStatus","_useOxyEvent","_errorHandlers","_useFileFiltering","_core","_OxySignInButton","_OxyDeviceSignIn","_oauthPopup","_OxyAuthPrompt","_OxyOAuthCallback","_OxyConsentScreen","_RequireOxyAuth","_FollowButton","_FollowTargetButton","_followRules","_followLabels","_useFollowTarget","_followTargetStore","_PeableButton","_OxyPayButton","_LogoIcon","_LogoText","_ProfileButton","_OxyAuthChooser","_OxySurfaceFrame","_OxySetupFlow","_oxySignInStep","_OxySignInPanel","_OxySignUpPanel","_OxyAccountPicker","_OxySignInSecurityPanel","_OxyEmailPanel","_OxyDeleteAccountPanel","_OxyLinkCommonsPanel","_OxyPasswordPanel","_OxyAuthenticatorPanel","_OxyAuthScreen","_OxySignInRequestSurface","_useDeviceSwitcher","_bottomSheetManager","_useSurfaceHeader","_SurfaceHeaderAction","_accountDialogManager","_usePersonalPlans","_AccountInvitationAcceptance","_DisplayCurrencySelector","_useDisplayCurrency","_useDisplayPrice","e","__esModule","default","registerScreens","screenComponents"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAOA;AACA;;AAIA;AACA;AACA;AACA;;AA6BA;AACA;AACA;AACA;AACA;;AAGA;;AASA;;AAmCA;;AAEA;;AAKA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAKA;AACA;AACA;;AAWA;AACA;AACA;;AAOA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAIA;AACA;AACA;;AAOA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.OxySetupFlow = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _components = require("react-native-css/components");
|
|
10
|
+
var _button = require("@oxy.so/bloom/button");
|
|
11
|
+
var _carousel = require("@oxy.so/bloom/carousel");
|
|
12
|
+
var _hooks = require("@oxy.so/bloom/hooks");
|
|
13
|
+
var _motion = require("@oxy.so/bloom/motion");
|
|
14
|
+
var _theme = require("@oxy.so/bloom/theme");
|
|
15
|
+
var _typography = require("@oxy.so/bloom/typography");
|
|
16
|
+
var _useI18n = require("../../hooks/useI18n.js");
|
|
17
|
+
var _useSurfaceFrameWidth = require("../../hooks/useSurfaceFrameWidth.js");
|
|
18
|
+
var _OxyAuthScreen = require("../signIn/OxyAuthScreen.js");
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
+
/**
|
|
21
|
+
* A platform's setup, in the SDK sign-in's own frame: the host's steps and the
|
|
22
|
+
* SDK's sign-in (`oxySignInStep`) one after another on one card, as macOS's
|
|
23
|
+
* Setup Assistant walks Welcome → Apple Account → … → Done (oxy ADR 0064,
|
|
24
|
+
* OxyOS ADR 0020).
|
|
25
|
+
*
|
|
26
|
+
* Controlled and presentational: the host owns which steps apply, which one is
|
|
27
|
+
* current and what every action does; this draws them.
|
|
28
|
+
*
|
|
29
|
+
* step the sign-in's shell (`OxyAuthScreen`): the step's icon or the Oxy
|
|
30
|
+
* mark (56), its title (48/800) and description (18), its content,
|
|
31
|
+
* blocks 24 apart, at most 448 wide. A step with an `aside` is the
|
|
32
|
+
* split card from `md` (`OxyAuthSplit`), asking its surface for 880
|
|
33
|
+
* as the sign-in's QR side does. A step without a title is drawn as
|
|
34
|
+
* its content brings it (the SDK sign-in brings its own screens).
|
|
35
|
+
* motion a step change is Bloom's `ScreenTransition` (forward from the
|
|
36
|
+
* right, back from the left; a cross-fade on the web), clipped to
|
|
37
|
+
* the card; nothing moves under reduced motion
|
|
38
|
+
* progress quiet, above the footer: decorative dots and "Step 2 of 5"
|
|
39
|
+
* footer Back leading (plain), then the secondary action and the primary
|
|
40
|
+
* (the solid default action) trailing — Tab order is visual order
|
|
41
|
+
*
|
|
42
|
+
* Accessibility: on a step change focus moves to the new step's title, or
|
|
43
|
+
* stays with its content when the step says so (`initialFocus: 'content'`: a
|
|
44
|
+
* field of its own takes it), and the change is said politely ("Create a PIN,
|
|
45
|
+
* step 3 of 5"). The dots are hidden from assistive technology; the count line
|
|
46
|
+
* and the announcement say where the step sits.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/** The split card's width, as the sign-in asks it for its QR side. */const SPLIT_WIDTH = 880;
|
|
50
|
+
|
|
51
|
+
/** A footer action of a step. */
|
|
52
|
+
|
|
53
|
+
/** The step's primary action: the default one, solid. */
|
|
54
|
+
|
|
55
|
+
/** One step of a setup. */
|
|
56
|
+
|
|
57
|
+
/** What one step change owes: the direction it travelled and what to say and focus. */
|
|
58
|
+
|
|
59
|
+
/** Asks the surface for the split card's width while mounted. */
|
|
60
|
+
const SplitWidth = () => {
|
|
61
|
+
(0, _useSurfaceFrameWidth.useSurfaceFrameWidth)(SPLIT_WIDTH);
|
|
62
|
+
return null;
|
|
63
|
+
};
|
|
64
|
+
const StepBody = ({
|
|
65
|
+
step,
|
|
66
|
+
titleRef
|
|
67
|
+
}) => {
|
|
68
|
+
const header = step.title ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthScreen.OxyAuthScreenHeader, {
|
|
69
|
+
title: step.title,
|
|
70
|
+
description: step.description,
|
|
71
|
+
icon: step.icon,
|
|
72
|
+
titleRef: titleRef
|
|
73
|
+
}) : null;
|
|
74
|
+
if (step.aside != null) {
|
|
75
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
76
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SplitWidth, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthScreen.OxyAuthSplit, {
|
|
77
|
+
bare: true,
|
|
78
|
+
aside: step.aside,
|
|
79
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_OxyAuthScreen.OxyAuthScreen, {
|
|
80
|
+
className: "md:max-w-none",
|
|
81
|
+
children: [header, step.content]
|
|
82
|
+
})
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
if (!header) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
87
|
+
children: step.content
|
|
88
|
+
});
|
|
89
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_OxyAuthScreen.OxyAuthScreen, {
|
|
90
|
+
children: [header, step.content]
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/** Off screen, still read: the web's polite announcement. */
|
|
95
|
+
const VISUALLY_HIDDEN = {
|
|
96
|
+
position: 'absolute',
|
|
97
|
+
width: 1,
|
|
98
|
+
height: 1,
|
|
99
|
+
margin: -1,
|
|
100
|
+
overflow: 'hidden',
|
|
101
|
+
opacity: 0
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/** Says `text` once, politely, on a platform with an announcement API (not the web). */
|
|
105
|
+
function announce(text) {
|
|
106
|
+
if (_reactNative.Platform.OS === 'ios') {
|
|
107
|
+
// iOS has no live regions; queued, the title the focus move reads goes first.
|
|
108
|
+
_reactNative.AccessibilityInfo.announceForAccessibilityWithOptions(text, {
|
|
109
|
+
queue: true
|
|
110
|
+
});
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
_reactNative.AccessibilityInfo.announceForAccessibility(text);
|
|
114
|
+
}
|
|
115
|
+
const OxySetupFlow = ({
|
|
116
|
+
label,
|
|
117
|
+
steps,
|
|
118
|
+
current,
|
|
119
|
+
onBack,
|
|
120
|
+
backLabel,
|
|
121
|
+
showProgress = true,
|
|
122
|
+
onMaxWidthChange
|
|
123
|
+
}) => {
|
|
124
|
+
const {
|
|
125
|
+
t
|
|
126
|
+
} = (0, _useI18n.useI18n)();
|
|
127
|
+
const theme = (0, _theme.useTheme)();
|
|
128
|
+
const reducedMotion = (0, _hooks.usePrefersReducedMotion)();
|
|
129
|
+
const index = steps.findIndex(candidate => candidate.id === current);
|
|
130
|
+
const step = index === -1 ? undefined : steps[index];
|
|
131
|
+
const total = steps.length;
|
|
132
|
+
const focusHeading = step?.title ? (step.initialFocus ?? 'heading') === 'heading' : false;
|
|
133
|
+
const announcement = step?.title != null && step.title !== '' ? t('common.stepAnnouncement', {
|
|
134
|
+
title: step.title,
|
|
135
|
+
step: index + 1,
|
|
136
|
+
total
|
|
137
|
+
}) : t('common.stepOf', {
|
|
138
|
+
step: index + 1,
|
|
139
|
+
total
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
// A step change, derived during render: which way it went, and what it owes.
|
|
143
|
+
const [change, setChange] = (0, _react.useState)({
|
|
144
|
+
id: current,
|
|
145
|
+
count: 0,
|
|
146
|
+
direction: 'forward',
|
|
147
|
+
announcement,
|
|
148
|
+
focusHeading
|
|
149
|
+
});
|
|
150
|
+
if (change.id !== current) {
|
|
151
|
+
const from = steps.findIndex(candidate => candidate.id === change.id);
|
|
152
|
+
setChange({
|
|
153
|
+
id: current,
|
|
154
|
+
count: change.count + 1,
|
|
155
|
+
direction: from !== -1 && index < from ? 'backward' : 'forward',
|
|
156
|
+
announcement,
|
|
157
|
+
focusHeading
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// The width the current step asks (the sign-in's split card, a step's aside),
|
|
162
|
+
// handed to the host and to any surface around the flow.
|
|
163
|
+
const [askedWidth, setAskedWidth] = (0, _react.useState)(null);
|
|
164
|
+
(0, _useSurfaceFrameWidth.useSurfaceFrameWidth)(askedWidth);
|
|
165
|
+
(0, _react.useLayoutEffect)(() => {
|
|
166
|
+
if (!onMaxWidthChange) return;
|
|
167
|
+
onMaxWidthChange(askedWidth);
|
|
168
|
+
return () => onMaxWidthChange(null);
|
|
169
|
+
}, [onMaxWidthChange, askedWidth]);
|
|
170
|
+
|
|
171
|
+
// Screen-reader focus to the new title on native (Bloom's, which waits for
|
|
172
|
+
// the view to be laid out); the browser's focus on the web, below.
|
|
173
|
+
const focusTitle = (0, _hooks.useItemAccessibilityFocus)(focusHeading && step ? step.id : null);
|
|
174
|
+
const webTitle = (0, _react.useRef)(null);
|
|
175
|
+
const titleRef = view => {
|
|
176
|
+
webTitle.current = view;
|
|
177
|
+
if (step) focusTitle(step.id, view);
|
|
178
|
+
};
|
|
179
|
+
(0, _react.useEffect)(() => {
|
|
180
|
+
if (change.count === 0) return;
|
|
181
|
+
if (_reactNative.Platform.OS === 'web') {
|
|
182
|
+
// The pressed button may be gone with its step: focus goes to the new title.
|
|
183
|
+
if (change.focusHeading) webTitle.current?.focus?.();
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
announce(change.announcement);
|
|
187
|
+
}, [change]);
|
|
188
|
+
if (!step) return null;
|
|
189
|
+
const busy = step.primary?.busy === true;
|
|
190
|
+
const wide = askedWidth !== null;
|
|
191
|
+
const body = /*#__PURE__*/(0, _jsxRuntime.jsx)(StepBody, {
|
|
192
|
+
step: step,
|
|
193
|
+
titleRef: titleRef
|
|
194
|
+
});
|
|
195
|
+
return (
|
|
196
|
+
/*#__PURE__*/
|
|
197
|
+
// A labelled region: the setup is a place a reader can name and jump to.
|
|
198
|
+
(0, _jsxRuntime.jsxs)(_components.View, {
|
|
199
|
+
role: "region",
|
|
200
|
+
accessibilityLabel: label,
|
|
201
|
+
className: `w-full self-center gap-6 max-w-[448px] ${wide ? 'md:max-w-[880px]' : ''}`,
|
|
202
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_useSurfaceFrameWidth.SurfaceFrameWidthContext.Provider, {
|
|
203
|
+
value: setAskedWidth,
|
|
204
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.View, {
|
|
205
|
+
className: "-m-1 overflow-hidden p-1",
|
|
206
|
+
children: reducedMotion ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.View, {
|
|
207
|
+
testID: "oxy-setup-step",
|
|
208
|
+
children: body
|
|
209
|
+
}, step.id) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_motion.ScreenTransition, {
|
|
210
|
+
direction: change.direction,
|
|
211
|
+
enabledWeb: true,
|
|
212
|
+
children: body
|
|
213
|
+
}, step.id)
|
|
214
|
+
})
|
|
215
|
+
}), showProgress && total > 1 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.View, {
|
|
216
|
+
className: "items-center gap-2",
|
|
217
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_carousel.CarouselDots, {
|
|
218
|
+
count: total,
|
|
219
|
+
index: index,
|
|
220
|
+
testID: "oxy-setup-dots"
|
|
221
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
222
|
+
variant: "caption-1-medium",
|
|
223
|
+
style: {
|
|
224
|
+
color: theme.colors.textSecondary
|
|
225
|
+
},
|
|
226
|
+
testID: "oxy-setup-progress",
|
|
227
|
+
children: t('common.stepOf', {
|
|
228
|
+
step: index + 1,
|
|
229
|
+
total
|
|
230
|
+
})
|
|
231
|
+
})]
|
|
232
|
+
}) : null, onBack || step.secondary || step.primary ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.View, {
|
|
233
|
+
className: "w-full flex-row items-center gap-3",
|
|
234
|
+
children: [onBack ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
235
|
+
appearance: "plain",
|
|
236
|
+
tone: "neutral",
|
|
237
|
+
size: "lg",
|
|
238
|
+
onPress: onBack,
|
|
239
|
+
disabled: busy,
|
|
240
|
+
testID: "oxy-setup-back",
|
|
241
|
+
children: backLabel ?? t('common.actions.back')
|
|
242
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.View, {
|
|
243
|
+
className: "flex-1"
|
|
244
|
+
}), step.secondary ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
245
|
+
appearance: "subtle",
|
|
246
|
+
tone: "neutral",
|
|
247
|
+
size: "lg",
|
|
248
|
+
onPress: step.secondary.onPress,
|
|
249
|
+
disabled: busy,
|
|
250
|
+
testID: step.secondary.testID ?? 'oxy-setup-secondary',
|
|
251
|
+
children: step.secondary.label
|
|
252
|
+
}) : null, step.primary ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
253
|
+
appearance: "solid",
|
|
254
|
+
tone: "action",
|
|
255
|
+
size: "lg",
|
|
256
|
+
onPress: step.primary.onPress,
|
|
257
|
+
disabled: step.primary.disabled,
|
|
258
|
+
loading: busy,
|
|
259
|
+
testID: step.primary.testID ?? 'oxy-setup-primary',
|
|
260
|
+
children: step.primary.label
|
|
261
|
+
}) : null]
|
|
262
|
+
}) : null, _reactNative.Platform.OS === 'web' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
263
|
+
"aria-live": "polite",
|
|
264
|
+
style: VISUALLY_HIDDEN,
|
|
265
|
+
testID: "oxy-setup-announcement",
|
|
266
|
+
children: change.count > 0 ? change.announcement : ''
|
|
267
|
+
}) : null]
|
|
268
|
+
})
|
|
269
|
+
);
|
|
270
|
+
};
|
|
271
|
+
exports.OxySetupFlow = OxySetupFlow;
|
|
272
|
+
//# sourceMappingURL=OxySetupFlow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_components","_button","_carousel","_hooks","_motion","_theme","_typography","_useI18n","_useSurfaceFrameWidth","_OxyAuthScreen","_jsxRuntime","SPLIT_WIDTH","SplitWidth","useSurfaceFrameWidth","StepBody","step","titleRef","header","title","jsx","OxyAuthScreenHeader","description","icon","aside","jsxs","Fragment","children","OxyAuthSplit","bare","OxyAuthScreen","className","content","VISUALLY_HIDDEN","position","width","height","margin","overflow","opacity","announce","text","Platform","OS","AccessibilityInfo","announceForAccessibilityWithOptions","queue","announceForAccessibility","OxySetupFlow","label","steps","current","onBack","backLabel","showProgress","onMaxWidthChange","t","useI18n","theme","useTheme","reducedMotion","usePrefersReducedMotion","index","findIndex","candidate","id","undefined","total","length","focusHeading","initialFocus","announcement","change","setChange","useState","count","direction","from","askedWidth","setAskedWidth","useLayoutEffect","focusTitle","useItemAccessibilityFocus","webTitle","useRef","view","useEffect","focus","busy","primary","wide","body","View","role","accessibilityLabel","SurfaceFrameWidthContext","Provider","value","testID","ScreenTransition","enabledWeb","CarouselDots","Text","variant","style","color","colors","textSecondary","secondary","Button","appearance","tone","size","onPress","disabled","loading","exports"],"sourceRoot":"../../../../../src","sources":["ui/components/setupFlow/OxySetupFlow.tsx"],"mappings":";;;;;;AA8BA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP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AS,CAAC3D;QAAK,CACf,CAAC,GACP,IAAI,EACPjC,IAAI,CAACyE,OAAO,gBACX,IAAA9E,WAAA,CAAAS,GAAA,EAAClB,OAAA,CAAA2G,MAAM;UACLC,UAAU,EAAC,OAAO;UAClBC,IAAI,EAAC,QAAQ;UACbC,IAAI,EAAC,IAAI;UACTC,OAAO,EAAEjG,IAAI,CAACyE,OAAO,CAACwB,OAAQ;UAC9BC,QAAQ,EAAElG,IAAI,CAACyE,OAAO,CAACyB,QAAS;UAChCC,OAAO,EAAE3B,IAAK;UACdU,MAAM,EAAElF,IAAI,CAACyE,OAAO,CAACS,MAAM,IAAI,mBAAoB;UAAAvE,QAAA,EAElDX,IAAI,CAACyE,OAAO,CAACxC;QAAK,CACb,CAAC,GACP,IAAI;MAAA,CACJ,CAAC,GACL,IAAI,EAEPP,qBAAQ,CAACC,EAAE,KAAK,KAAK,gBACpB,IAAAhC,WAAA,CAAAS,GAAA,EAACpB,YAAA,CAAAsG,IAAM;QAAC,aAAU,QAAQ;QAACE,KAAK,EAAEvE,eAAgB;QAACiE,MAAM,EAAC,wBAAwB;QAAAvE,QAAA,EAC/E6C,MAAM,CAACG,KAAK,GAAG,CAAC,GAAGH,MAAM,CAACD,YAAY,GAAG;MAAE,CACtC,CAAC,GACP,IAAI;IAAA,CACJ;EAAC;AAEX,CAAC;AAAC6C,OAAA,CAAApE,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.oxySignInStep = oxySignInStep;
|
|
7
|
+
var _OxyAuthChooser = _interopRequireDefault(require("../OxyAuthChooser.js"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/**
|
|
11
|
+
* The SDK's sign-in as a step of a platform's setup (`OxySetupFlow`): the
|
|
12
|
+
* account dialog's own chooser (`OxyAuthChooser`), unchanged — the same sign-in
|
|
13
|
+
* (the Commons QR from `md`, the email's code or link, the password, the
|
|
14
|
+
* authenticator), sign-up and request views every Oxy app shows.
|
|
15
|
+
*
|
|
16
|
+
* The flow is its surface: the chooser asks it for the split card's 880 while
|
|
17
|
+
* its QR side shows and for the flow's own width after, as it asks the account
|
|
18
|
+
* dialog. The step draws no title (the chooser's screens bring their own) and
|
|
19
|
+
* leaves focus to them (the identifier field takes it on a computer).
|
|
20
|
+
*
|
|
21
|
+
* The host learns the sign-in where it always has: the credential a sign-in
|
|
22
|
+
* commits goes to `OxyProvider`'s `authStateStore` (`PlatformSetupAuthStateStore`,
|
|
23
|
+
* with `context.method` 'qr' or 'password' and the typed password), and
|
|
24
|
+
* `useOxy()` follows the signed-in account. Needs `OxyProvider` around the flow.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
function oxySignInStep(options = {}) {
|
|
28
|
+
return {
|
|
29
|
+
id: options.id ?? 'oxy-sign-in',
|
|
30
|
+
initialFocus: 'content',
|
|
31
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthChooser.default, {})
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=oxySignInStep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_OxyAuthChooser","_interopRequireDefault","require","_jsxRuntime","e","__esModule","default","oxySignInStep","options","id","initialFocus","content","jsx"],"sourceRoot":"../../../../../src","sources":["ui/components/setupFlow/oxySignInStep.tsx"],"mappings":";;;;;;AAiBA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA+C,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAjB/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUO,SAASG,aAAaA,CAACC,OAA6B,GAAG,CAAC,CAAC,EAAgB;EAC9E,OAAO;IACLC,EAAE,EAAED,OAAO,CAACC,EAAE,IAAI,aAAa;IAC/BC,YAAY,EAAE,SAAS;IACvBC,OAAO,eAAE,IAAAR,WAAA,CAAAS,GAAA,EAACZ,eAAA,CAAAM,OAAc,IAAE;EAC5B,CAAC;AACH","ignoreList":[]}
|
|
@@ -16,8 +16,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
16
16
|
* The shell every Oxy sign-in screen shares — the in-app account dialog and
|
|
17
17
|
* every page of the auth.oxy.so IdP render these, so the two cannot drift:
|
|
18
18
|
*
|
|
19
|
-
* header the Oxy mark (56)
|
|
20
|
-
* description, 8 apart
|
|
19
|
+
* header the Oxy mark (56) or the screen's own icon, then the title
|
|
20
|
+
* (48/800, tight) and a 18px description, 8 apart
|
|
21
21
|
* screen blocks 24 apart, at most 448 wide
|
|
22
22
|
* split from `md`, Bloom `AuthCard`'s split base — max 880, radius 24,
|
|
23
23
|
* 1px border, two equal columns, the right one on the secondary
|
|
@@ -49,23 +49,37 @@ const TERMS = {
|
|
|
49
49
|
textAlign: 'center',
|
|
50
50
|
paddingHorizontal: 24
|
|
51
51
|
};
|
|
52
|
-
/**
|
|
52
|
+
/** A title focused by code is a place, not a control: no focus ring. */
|
|
53
|
+
const PLACE = {
|
|
54
|
+
outlineWidth: 0
|
|
55
|
+
};
|
|
56
|
+
/** The Oxy mark (or the screen's icon) over the screen's title and description. */
|
|
53
57
|
const OxyAuthScreenHeader = ({
|
|
54
58
|
title,
|
|
55
|
-
description
|
|
59
|
+
description,
|
|
60
|
+
icon,
|
|
61
|
+
titleRef
|
|
56
62
|
}) => {
|
|
57
63
|
const theme = (0, _theme.useTheme)();
|
|
64
|
+
const focusable = titleRef != null && _reactNative.Platform.OS === 'web';
|
|
58
65
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.View, {
|
|
59
66
|
className: "gap-6",
|
|
60
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoIcon.LogoIcon, {
|
|
67
|
+
children: [icon ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoIcon.LogoIcon, {
|
|
61
68
|
height: LOGO_HEIGHT
|
|
62
69
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.View, {
|
|
63
70
|
className: "max-w-[90%] gap-2",
|
|
64
71
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
65
|
-
accessibilityRole: "header"
|
|
72
|
+
accessibilityRole: "header"
|
|
73
|
+
// Bloom's `Text` hands `ref` (a prop in React 19) and react-native-web's
|
|
74
|
+
// `tabIndex` to its host text; neither is in React Native's `TextProps`.
|
|
75
|
+
,
|
|
76
|
+
ref: titleRef,
|
|
77
|
+
...(focusable ? {
|
|
78
|
+
tabIndex: -1
|
|
79
|
+
} : null),
|
|
66
80
|
style: [TITLE, {
|
|
67
81
|
color: theme.colors.text
|
|
68
|
-
}],
|
|
82
|
+
}, focusable ? PLACE : null],
|
|
69
83
|
children: title
|
|
70
84
|
}), description != null && description !== '' ? typeof description === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
71
85
|
style: [DESCRIPTION, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_components","_loading","_theme","_typography","_useI18n","_LogoIcon","_jsxRuntime","LOGO_HEIGHT","TERMS_URL","PRIVACY_URL","TITLE","fontSize","lineHeight","fontWeight","letterSpacing","DESCRIPTION","TERMS","textAlign","paddingHorizontal","OxyAuthScreenHeader","title","description","theme","useTheme","jsxs","View","className","children","jsx","LogoIcon","height","Text","accessibilityRole","style","color","colors","text","textSecondary","exports","OxyAuthScreen","OxyAuthSplit","aside","bare","backgroundColor","backgroundSecondary","OxyAuthLoading","t","useI18n","Loading","variant","size","accessibilityLabel","testID","OxyAuthTerms","link","textDecorationLine","onPress","Linking","openURL"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/OxyAuthScreen.tsx"],"mappings":";;;;;;AAmBA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAA4C,IAAAO,WAAA,GAAAP,OAAA;AAzB5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA,MAAMQ,WAAW,GAAG,EAAE;AACtB,MAAMC,SAAS,GAAG,+DAA+D;AACjF,MAAMC,WAAW,GAAG,sDAAsD;AAE1E,MAAMC,KAAK,GAAG;EAAEC,QAAQ,EAAE,EAAE;EAAEC,UAAU,EAAE,EAAE;EAAEC,UAAU,EAAE,KAAK;EAAEC,aAAa,EAAE,CAAC;AAAI,CAAU;AAC/F,MAAMC,WAAW,GAAG;EAAEJ,QAAQ,EAAE,EAAE;EAAEC,UAAU,EAAE;AAAG,CAAU;AAC7D,MAAMI,KAAK,GAAG;EAAEL,QAAQ,EAAE,EAAE;EAAEC,UAAU,EAAE,EAAE;EAAEK,SAAS,EAAE,QAAQ;EAAEC,iBAAiB,EAAE;AAAG,CAAU;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_components","_loading","_theme","_typography","_useI18n","_LogoIcon","_jsxRuntime","LOGO_HEIGHT","TERMS_URL","PRIVACY_URL","TITLE","fontSize","lineHeight","fontWeight","letterSpacing","DESCRIPTION","TERMS","textAlign","paddingHorizontal","PLACE","outlineWidth","OxyAuthScreenHeader","title","description","icon","titleRef","theme","useTheme","focusable","Platform","OS","jsxs","View","className","children","jsx","LogoIcon","height","Text","accessibilityRole","ref","tabIndex","style","color","colors","text","textSecondary","exports","OxyAuthScreen","OxyAuthSplit","aside","bare","backgroundColor","backgroundSecondary","OxyAuthLoading","t","useI18n","Loading","variant","size","accessibilityLabel","testID","OxyAuthTerms","link","textDecorationLine","onPress","Linking","openURL"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/OxyAuthScreen.tsx"],"mappings":";;;;;;AAmBA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAA4C,IAAAO,WAAA,GAAAP,OAAA;AAzB5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA,MAAMQ,WAAW,GAAG,EAAE;AACtB,MAAMC,SAAS,GAAG,+DAA+D;AACjF,MAAMC,WAAW,GAAG,sDAAsD;AAE1E,MAAMC,KAAK,GAAG;EAAEC,QAAQ,EAAE,EAAE;EAAEC,UAAU,EAAE,EAAE;EAAEC,UAAU,EAAE,KAAK;EAAEC,aAAa,EAAE,CAAC;AAAI,CAAU;AAC/F,MAAMC,WAAW,GAAG;EAAEJ,QAAQ,EAAE,EAAE;EAAEC,UAAU,EAAE;AAAG,CAAU;AAC7D,MAAMI,KAAK,GAAG;EAAEL,QAAQ,EAAE,EAAE;EAAEC,UAAU,EAAE,EAAE;EAAEK,SAAS,EAAE,QAAQ;EAAEC,iBAAiB,EAAE;AAAG,CAAU;AACnG;AACA,MAAMC,KAAK,GAAG;EAAEC,YAAY,EAAE;AAAE,CAAU;AAe1C;AACO,MAAMC,mBAAuD,GAAGA,CAAC;EACtEC,KAAK;EACLC,WAAW;EACXC,IAAI;EACJC;AACF,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAG,IAA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,CAAC,kBAAkB,CAAC,EAAE,GAAG,eAC3B,IAAAjD,WAAA,CAAA6B,GAAA,EAACrC,YAAA,CAAAwC,IAAM;MACLC,iBAAiB,EAAC,MAAM;MACxBG,KAAK,EAAEqB,IAAK;MACZE,OAAO,EAAEA,CAAA,KAAM,KAAKC,oBAAO,CAACC,OAAO,CAAC1D,WAAW,CAAE;MAAAyB,QAAA,EAEhDqB,CAAC,CAAC,0BAA0B;IAAC,CACxB,CAAC,KAEX;EAAA,CAAM,CAAC;AAEX,CAAC;AAACR,OAAA,CAAAe,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -175,6 +175,13 @@ const OxySignInPanel = ({
|
|
|
175
175
|
|
|
176
176
|
// One sign-in ends once: the typed code and the opened link can race.
|
|
177
177
|
const finishingRef = (0, _react.useRef)(false);
|
|
178
|
+
// How this sign-in's first factor went, for a platform's setup store
|
|
179
|
+
// (`SetupSignInContext`): kept only until the sign-in commits or fails, so
|
|
180
|
+
// the password typed is held no longer than the request that uses it.
|
|
181
|
+
const firstFactorRef = (0, _react.useRef)(null);
|
|
182
|
+
(0, _react.useEffect)(() => () => {
|
|
183
|
+
firstFactorRef.current = null;
|
|
184
|
+
}, []);
|
|
178
185
|
const finish = (0, _react.useCallback)(async (result, from, request) => {
|
|
179
186
|
if (finishingRef.current) return;
|
|
180
187
|
if ((0, _client.isEmailSignInChooseAccount)(result)) {
|
|
@@ -203,8 +210,10 @@ const OxySignInPanel = ({
|
|
|
203
210
|
}
|
|
204
211
|
finishingRef.current = true;
|
|
205
212
|
(0, _signInFlowStore.writeSignInFlow)(flowOwner, SIGN_IN_FLOW_KEY, undefined);
|
|
213
|
+
const setup = firstFactorRef.current ?? undefined;
|
|
214
|
+
firstFactorRef.current = null;
|
|
206
215
|
try {
|
|
207
|
-
await handleWebSession(result);
|
|
216
|
+
await handleWebSession(result, setup);
|
|
208
217
|
} catch (reason) {
|
|
209
218
|
finishingRef.current = false;
|
|
210
219
|
throw reason;
|
|
@@ -253,6 +262,9 @@ const OxySignInPanel = ({
|
|
|
253
262
|
setError(null);
|
|
254
263
|
setNotice(null);
|
|
255
264
|
setPending(true);
|
|
265
|
+
firstFactorRef.current = {
|
|
266
|
+
method: 'emailCode'
|
|
267
|
+
};
|
|
256
268
|
oxyServices.auth.email.confirm({
|
|
257
269
|
requestId: request.requestId,
|
|
258
270
|
requestSecret: request.requestSecret,
|
|
@@ -269,6 +281,9 @@ const OxySignInPanel = ({
|
|
|
269
281
|
setError(null);
|
|
270
282
|
setPending(true);
|
|
271
283
|
setChoosingId(account.id);
|
|
284
|
+
firstFactorRef.current = {
|
|
285
|
+
method: 'emailCode'
|
|
286
|
+
};
|
|
272
287
|
oxyServices.auth.email.choose({
|
|
273
288
|
requestId: request.requestId,
|
|
274
289
|
requestSecret: request.requestSecret,
|
|
@@ -287,10 +302,17 @@ const OxySignInPanel = ({
|
|
|
287
302
|
const name = step.identifier;
|
|
288
303
|
setError(null);
|
|
289
304
|
setPending(true);
|
|
305
|
+
firstFactorRef.current = {
|
|
306
|
+
method: 'password',
|
|
307
|
+
password
|
|
308
|
+
};
|
|
290
309
|
oxyServices.auth.password.signIn({
|
|
291
310
|
identifier: name,
|
|
292
311
|
password
|
|
293
|
-
}).then(result => finish(result, name)).catch(
|
|
312
|
+
}).then(result => finish(result, name)).catch(reason => {
|
|
313
|
+
firstFactorRef.current = null;
|
|
314
|
+
fail(reason);
|
|
315
|
+
}).finally(() => setPending(false));
|
|
294
316
|
};
|
|
295
317
|
const submitSecondFactor = typed => {
|
|
296
318
|
if (step.name !== 'second-factor' || blocked) return;
|
|
@@ -338,6 +360,9 @@ const OxySignInPanel = ({
|
|
|
338
360
|
requestSecret
|
|
339
361
|
});
|
|
340
362
|
if (!('status' in result)) {
|
|
363
|
+
firstFactorRef.current = {
|
|
364
|
+
method: 'emailCode'
|
|
365
|
+
};
|
|
341
366
|
await finishRef.current(result, requestIdentifier, {
|
|
342
367
|
requestId,
|
|
343
368
|
requestSecret
|