@alore/auth-react-ui 1.2.0-alpha.23 → 1.2.0-alpha.24
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/dist/cjs/auth/ForgotPassword.js +24 -4
- package/dist/cjs/auth/ForgotPassword.js.map +1 -1
- package/dist/cjs/auth/Login.js +67 -43
- package/dist/cjs/auth/Login.js.map +1 -1
- package/dist/cjs/auth/Register.js +93 -26
- package/dist/cjs/auth/Register.js.map +1 -1
- package/dist/cjs/components/Auth.js +7 -2
- package/dist/cjs/components/Auth.js.map +1 -1
- package/dist/cjs/components/AuthProvider.d.ts +16 -0
- package/dist/cjs/components/BackButton.js +1 -1
- package/dist/cjs/components/BackButton.js.map +1 -1
- package/dist/cjs/components/CheckboxForm.js +2 -2
- package/dist/cjs/components/CheckboxForm.js.map +1 -1
- package/dist/cjs/components/InputForm.d.ts +2 -1
- package/dist/cjs/components/InputForm.js +2 -2
- package/dist/cjs/components/InputForm.js.map +1 -1
- package/dist/cjs/components/InputOTP.js +1 -1
- package/dist/cjs/components/InputOTP.js.map +1 -1
- package/dist/cjs/components/LinkButton.d.ts +14 -0
- package/dist/cjs/components/LinkButton.js +29 -0
- package/dist/cjs/components/LinkButton.js.map +1 -0
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.js +3 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/dictionaries/en.json +1 -0
- package/dist/cjs/dictionaries/pt.json +8 -7
- package/dist/cjs/get-dictionary.d.ts +3 -0
- package/dist/cjs/hooks/useAuthService.d.ts +48 -0
- package/dist/cjs/hooks/useAuthServiceInstance.d.ts +16 -0
- package/dist/cjs/hooks/useDictionary.d.ts +1 -0
- package/dist/cjs/machine/index.d.ts +32 -0
- package/dist/cjs/machine/index.js +48 -0
- package/dist/cjs/machine/index.js.map +1 -1
- package/dist/cjs/machine/types.d.ts +13 -1
- package/dist/cjs/styles/themes.js +2 -2
- package/dist/cjs/styles/themes.js.map +1 -1
- package/dist/mjs/auth/ForgotPassword.js +25 -5
- package/dist/mjs/auth/ForgotPassword.js.map +1 -1
- package/dist/mjs/auth/Login.js +69 -45
- package/dist/mjs/auth/Login.js.map +1 -1
- package/dist/mjs/auth/Register.js +95 -28
- package/dist/mjs/auth/Register.js.map +1 -1
- package/dist/mjs/components/Auth.js +7 -2
- package/dist/mjs/components/Auth.js.map +1 -1
- package/dist/mjs/components/AuthProvider.d.ts +16 -0
- package/dist/mjs/components/BackButton.js +1 -1
- package/dist/mjs/components/BackButton.js.map +1 -1
- package/dist/mjs/components/CheckboxForm.js +2 -2
- package/dist/mjs/components/CheckboxForm.js.map +1 -1
- package/dist/mjs/components/InputForm.d.ts +2 -1
- package/dist/mjs/components/InputForm.js +2 -2
- package/dist/mjs/components/InputForm.js.map +1 -1
- package/dist/mjs/components/InputOTP.js +1 -1
- package/dist/mjs/components/InputOTP.js.map +1 -1
- package/dist/mjs/components/LinkButton.d.ts +14 -0
- package/dist/mjs/components/LinkButton.js +10 -0
- package/dist/mjs/components/LinkButton.js.map +1 -0
- package/dist/mjs/components/index.d.ts +1 -0
- package/dist/mjs/components/index.js +1 -0
- package/dist/mjs/components/index.js.map +1 -1
- package/dist/mjs/dictionaries/en.json +1 -0
- package/dist/mjs/dictionaries/pt.json +8 -7
- package/dist/mjs/get-dictionary.d.ts +3 -0
- package/dist/mjs/hooks/useAuthService.d.ts +48 -0
- package/dist/mjs/hooks/useAuthServiceInstance.d.ts +16 -0
- package/dist/mjs/hooks/useDictionary.d.ts +1 -0
- package/dist/mjs/machine/index.d.ts +32 -0
- package/dist/mjs/machine/index.js +45 -0
- package/dist/mjs/machine/index.js.map +1 -1
- package/dist/mjs/machine/types.d.ts +13 -1
- package/dist/mjs/styles/themes.js +3 -2
- package/dist/mjs/styles/themes.js.map +1 -1
- package/package.json +2 -2
|
@@ -40,6 +40,14 @@ export declare const AuthContext: React.Context<import("xstate").Interpreter<imp
|
|
|
40
40
|
accessToken: string;
|
|
41
41
|
providerName: string;
|
|
42
42
|
};
|
|
43
|
+
} | {
|
|
44
|
+
type: "SOCIAL_LOGIN";
|
|
45
|
+
payload: {
|
|
46
|
+
idToken: string;
|
|
47
|
+
providerName: string;
|
|
48
|
+
device?: string | undefined;
|
|
49
|
+
nonce?: string | undefined;
|
|
50
|
+
};
|
|
43
51
|
} | {
|
|
44
52
|
type: "START_PASSKEY_LOGIN";
|
|
45
53
|
payload: {
|
|
@@ -305,6 +313,14 @@ export declare const AuthContext: React.Context<import("xstate").Interpreter<imp
|
|
|
305
313
|
accessToken: string;
|
|
306
314
|
providerName: string;
|
|
307
315
|
};
|
|
316
|
+
} | {
|
|
317
|
+
type: "SOCIAL_LOGIN";
|
|
318
|
+
payload: {
|
|
319
|
+
idToken: string;
|
|
320
|
+
providerName: string;
|
|
321
|
+
device?: string | undefined;
|
|
322
|
+
nonce?: string | undefined;
|
|
323
|
+
};
|
|
308
324
|
} | {
|
|
309
325
|
type: "START_PASSKEY_LOGIN";
|
|
310
326
|
payload: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ArrowLeftIcon } from '@heroicons/react/20/solid';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
const BackButton = ({ onClick, disabled = false, children, className = '', ...props }) => (React.createElement("
|
|
5
|
+
const BackButton = ({ onClick, disabled = false, children, className = '', ...props }) => (React.createElement("button", { ...props, type: "button", "data-testid": "back-button", onClick: onClick, disabled: disabled, className: twMerge(`flex w-fit cursor-pointer items-center gap-x-1 rounded text-base text-[var(--primary-color)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary-color)] focus-visible:ring-offset-2`, disabled ? 'cursor-not-allowed' : '', className) },
|
|
6
6
|
React.createElement(ArrowLeftIcon, { className: "size-4" }),
|
|
7
7
|
React.createElement("span", { className: "ml-1 text-sm" }, children)));
|
|
8
8
|
export default BackButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackButton.js","sourceRoot":"","sources":["../../../src/components/BackButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AASzC,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,KAAK,EAAE,QAAQ,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,KAAK,EAAS,EAAE,EAAE,CAAC,CAC/F,
|
|
1
|
+
{"version":3,"file":"BackButton.js","sourceRoot":"","sources":["../../../src/components/BackButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AASzC,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,KAAK,EAAE,QAAQ,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,KAAK,EAAS,EAAE,EAAE,CAAC,CAC/F,mCACM,KAAK,EACT,IAAI,EAAC,QAAQ,iBACD,aAAa,EACzB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,OAAO,CAChB,4MAA4M,EAC5M,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,EACpC,SAAS,CACV;IAED,oBAAC,aAAa,IAAC,SAAS,EAAC,QAAQ,GAAG;IACpC,8BAAM,SAAS,EAAC,cAAc,IAAE,QAAQ,CAAQ,CACzC,CACV,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { Controller } from 'react-hook-form';
|
|
5
5
|
const CheckboxForm = ({ className = '', control, name, label, 'data-testid': dataTest, ...rest }) => (React.createElement(Controller, { control: control, name: name, render: ({ field }) => (React.createElement("div", { className: className },
|
|
6
6
|
React.createElement("div", { className: "mb-2 flex items-center gap-x-2" },
|
|
7
|
-
React.createElement(Checkbox, { ...field, ...rest, value: String(field.value), checked: field.value, "data-testid": dataTest }),
|
|
8
|
-
React.createElement(Label, { className: "text-sm font-normal text-gray-500", htmlFor:
|
|
7
|
+
React.createElement(Checkbox, { ...field, ...rest, id: field.name, value: String(field.value), checked: field.value, "data-testid": dataTest }),
|
|
8
|
+
React.createElement(Label, { className: "text-sm font-normal text-gray-500", htmlFor: field.name }, label)))) }));
|
|
9
9
|
export default CheckboxForm;
|
|
10
10
|
//# sourceMappingURL=CheckboxForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxForm.js","sourceRoot":"","sources":["../../../src/components/CheckboxForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAiB,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAW,UAAU,EAAe,MAAM,iBAAiB,CAAC;AAUnE,MAAM,YAAY,GAAG,CAAC,EACpB,SAAS,GAAG,EAAE,EACd,OAAO,EACP,IAAI,EACJ,KAAK,EACL,aAAa,EAAE,QAAQ,EACvB,GAAG,IAAI,EACD,EAAE,EAAE,CAAC,CACX,oBAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACrB,6BAAK,SAAS,EAAE,SAAS;QACvB,6BAAK,SAAS,EAAC,gCAAgC;YAC7C,oBAAC,QAAQ,OACH,KAAK,KACL,IAAI,EACR,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAC1B,OAAO,EAAE,KAAK,CAAC,KAAK,iBACP,QAAQ,GACrB;YACF,oBAAC,KAAK,IACJ,SAAS,EAAC,mCAAmC,EAC7C,OAAO,
|
|
1
|
+
{"version":3,"file":"CheckboxForm.js","sourceRoot":"","sources":["../../../src/components/CheckboxForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAiB,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAW,UAAU,EAAe,MAAM,iBAAiB,CAAC;AAUnE,MAAM,YAAY,GAAG,CAAC,EACpB,SAAS,GAAG,EAAE,EACd,OAAO,EACP,IAAI,EACJ,KAAK,EACL,aAAa,EAAE,QAAQ,EACvB,GAAG,IAAI,EACD,EAAE,EAAE,CAAC,CACX,oBAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACrB,6BAAK,SAAS,EAAE,SAAS;QACvB,6BAAK,SAAS,EAAC,gCAAgC;YAC7C,oBAAC,QAAQ,OACH,KAAK,KACL,IAAI,EACR,EAAE,EAAE,KAAK,CAAC,IAAI,EACd,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAC1B,OAAO,EAAE,KAAK,CAAC,KAAK,iBACP,QAAQ,GACrB;YACF,oBAAC,KAAK,IACJ,SAAS,EAAC,mCAAmC,EAC7C,OAAO,EAAE,KAAK,CAAC,IAAI,IAElB,KAAK,CACA,CACJ,CACF,CACP,GACD,CACH,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -10,6 +10,7 @@ interface Props extends TextInputProps {
|
|
|
10
10
|
'data-testid'?: string;
|
|
11
11
|
className?: string;
|
|
12
12
|
inputClassName?: string;
|
|
13
|
+
passwordToggleLabel?: string;
|
|
13
14
|
}
|
|
14
|
-
declare const InputForm: ({ control, name, label, errors, type, "data-testid": dataTest, className, inputClassName, ...rest }: Props) => React.JSX.Element;
|
|
15
|
+
declare const InputForm: ({ control, name, label, errors, type, "data-testid": dataTest, className, inputClassName, passwordToggleLabel, ...rest }: Props) => React.JSX.Element;
|
|
15
16
|
export default InputForm;
|
|
@@ -6,14 +6,14 @@ import { Controller } from 'react-hook-form';
|
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
import InputErrorHelperText from './InputErrorHelperText';
|
|
8
8
|
const infoIcon = () => React.createElement("i", { className: "fa-solid fa-circle-info text-alr-red" });
|
|
9
|
-
const InputForm = ({ control, name, label, errors, type = 'text', 'data-testid': dataTest, className, inputClassName, ...rest }) => {
|
|
9
|
+
const InputForm = ({ control, name, label, errors, type = 'text', 'data-testid': dataTest, className, inputClassName, passwordToggleLabel, ...rest }) => {
|
|
10
10
|
const [showPassword, setShowPassword] = useState(false);
|
|
11
11
|
const isPassword = type === 'password';
|
|
12
12
|
return (React.createElement(Controller, { control: control, name: name, render: ({ field }) => (React.createElement("div", { className: twMerge('flex flex-col', className) },
|
|
13
13
|
label && (React.createElement(Label, { className: "mb-2 self-start text-left font-medium !text-gray-500", htmlFor: field.name }, label)),
|
|
14
14
|
React.createElement("div", { className: "relative" },
|
|
15
15
|
React.createElement(TextInput, { ...field, ...rest, type: isPassword && showPassword ? 'text' : type, color: errors[field.name] ? 'failure' : 'gray', rightIcon: errors[field.name] && infoIcon, "data-testid": dataTest, className: inputClassName }),
|
|
16
|
-
isPassword && (React.createElement("button", { type: "button",
|
|
16
|
+
isPassword && (React.createElement("button", { type: "button", "aria-label": passwordToggleLabel, "aria-pressed": showPassword, onClick: () => setShowPassword((v) => !v), className: "absolute inset-y-0 right-0 flex items-center rounded-full pl-2 pr-4 text-gray-500 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary-color)]", "data-testid": dataTest ? `${dataTest}-toggle-visibility` : undefined }, showPassword ? (React.createElement(EyeSlashIcon, { className: "size-4" })) : (React.createElement(EyeIcon, { className: "size-4" }))))),
|
|
17
17
|
React.createElement(HelperText, null, errors[field.name] && (React.createElement(InputErrorHelperText, { id: dataTest, message: String(errors?.[field.name]?.message) }))))) }));
|
|
18
18
|
};
|
|
19
19
|
export default InputForm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputForm.js","sourceRoot":"","sources":["../../../src/components/InputForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAC9E,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAW,UAAU,EAAgC,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"InputForm.js","sourceRoot":"","sources":["../../../src/components/InputForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAC9E,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAW,UAAU,EAAgC,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAc1D,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,2BAAG,SAAS,EAAC,sCAAsC,GAAG,CAAC;AAE9E,MAAM,SAAS,GAAG,CAAC,EACjB,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,EACN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C,CAAC,CACd,oBAAC,YAAY,IAAC,SAAS,EAAC,QAAQ,GAAG,CACpC,CAAC,CAAC,CAAC,CACF,oBAAC,OAAO,IAAC,SAAS,EAAC,QAAQ,GAAG,CAC/B,CACM,CACV,CACG;YACN,oBAAC,UAAU,QACR,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CACrB,oBAAC,oBAAoB,IACnB,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,GAC9C,CACH,CACU,CACT,CACP,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -86,7 +86,7 @@ const OTPInput = ({ value, inputLength, 'data-testid': dataTest = '', errorMessa
|
|
|
86
86
|
// eslint-disable-next-line react/no-array-index-key
|
|
87
87
|
key: idx, "data-testid": `${dataTest}-${idx}`, type: "text",
|
|
88
88
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
89
|
-
autoFocus: idx === 0, inputMode: "numeric", autoComplete: "one-time-code", pattern: "\\d{1}", maxLength: inputLength, className: twMerge(`h-[2.56rem] w-[2.56rem] rounded-md border text-center font-semibold duration-500`, errorMessage ? 'border-alr-red' : 'border-gray-300'), value: digit, onChange: (e) => inputOnChange(e, idx), onKeyDown: inputOnKeyDown, onFocus: inputOnFocus, disabled: disabled })))),
|
|
89
|
+
autoFocus: idx === 0, inputMode: "numeric", autoComplete: "one-time-code", pattern: "\\d{1}", maxLength: inputLength, className: twMerge(`h-[2.56rem] w-[2.56rem] rounded-md border text-center font-semibold duration-500 focus:outline-none focus:ring-2 focus:ring-[var(--primary-color)]`, errorMessage ? 'border-alr-red' : 'border-gray-300'), value: digit, onChange: (e) => inputOnChange(e, idx), onKeyDown: inputOnKeyDown, onFocus: inputOnFocus, disabled: disabled })))),
|
|
90
90
|
errorMessage && React.createElement("span", { className: "text-alr-red text-base font-normal" }, errorMessage)));
|
|
91
91
|
};
|
|
92
92
|
export default OTPInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputOTP.js","sourceRoot":"","sources":["../../../src/components/InputOTP.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAazC,MAAM,QAAQ,GAAG,OAAO,CAAC;AAEzB,MAAM,QAAQ,GAAG,CAAC,EAChB,KAAK,EACL,WAAW,EACX,aAAa,EAAE,QAAQ,GAAG,EAAE,EAC5B,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,QAAQ,GAAG,KAAK,GACV,EAAE,EAAE;IACV,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACnC,MAAM,KAAK,GAAkB,EAAE,CAAC;QAEhC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YAE3B,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjB,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;IAEzB,SAAS,gBAAgB,CAAC,MAAmB;QAC3C,MAAM,kBAAkB,GAAG,MAAM,CAAC,kBAA6C,CAAC;QAEhF,IAAI,kBAAkB,EAAE,CAAC;YACvB,kBAAkB,CAAC,KAAK,EAA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: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
'data-testid'?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Inline textual action (forgot password, sign up, resend code, 2FA method switches).
|
|
11
|
+
* These used to be `span`/`div` with an onClick, which no keyboard could ever reach.
|
|
12
|
+
*/
|
|
13
|
+
declare const LinkButton: ({ onClick, children, className, disabled, "data-testid": dataTest, ...props }: Props) => React.JSX.Element;
|
|
14
|
+
export default LinkButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
/**
|
|
5
|
+
* Inline textual action (forgot password, sign up, resend code, 2FA method switches).
|
|
6
|
+
* These used to be `span`/`div` with an onClick, which no keyboard could ever reach.
|
|
7
|
+
*/
|
|
8
|
+
const LinkButton = ({ onClick, children, className = '', disabled = false, 'data-testid': dataTest, ...props }) => (React.createElement("button", { ...props, type: "button", "data-testid": dataTest, onClick: onClick, disabled: disabled, className: twMerge('w-fit cursor-pointer rounded font-medium text-[var(--primary-color)] duration-300 hover:text-[var(--primary-hover)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary-color)] focus-visible:ring-offset-2 disabled:cursor-not-allowed', className) }, children));
|
|
9
|
+
export default LinkButton;
|
|
10
|
+
//# sourceMappingURL=LinkButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkButton.js","sourceRoot":"","sources":["../../../src/components/LinkButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAUzC;;;GAGG;AACH,MAAM,UAAU,GAAG,CAAC,EAClB,OAAO,EACP,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,QAAQ,GAAG,KAAK,EAChB,aAAa,EAAE,QAAQ,EACvB,GAAG,KAAK,EACF,EAAE,EAAE,CAAC,CACX,mCACM,KAAK,EACT,IAAI,EAAC,QAAQ,iBACA,QAAQ,EACrB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,OAAO,CAChB,+PAA+P,EAC/P,SAAS,CACV,IAEA,QAAQ,CACF,CACV,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as InputOTP } from './InputOTP';
|
|
2
2
|
export { default as InputForm } from './InputForm';
|
|
3
3
|
export { default as BackButton } from './BackButton';
|
|
4
|
+
export { default as LinkButton } from './LinkButton';
|
|
4
5
|
export { default as CheckboxForm } from './CheckboxForm';
|
|
5
6
|
export { default as TermsModal } from './TermsModal';
|
|
6
7
|
export { default as FormRules } from './FormRules';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as InputOTP } from './InputOTP';
|
|
2
2
|
export { default as InputForm } from './InputForm';
|
|
3
3
|
export { default as BackButton } from './BackButton';
|
|
4
|
+
export { default as LinkButton } from './LinkButton';
|
|
4
5
|
export { default as CheckboxForm } from './CheckboxForm';
|
|
5
6
|
export { default as TermsModal } from './TermsModal';
|
|
6
7
|
export { default as FormRules } from './FormRules';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"signWithPasskey": "Sign in with a passkey",
|
|
27
27
|
"continueApple": "Continue with Apple",
|
|
28
28
|
"emailDomainNotAllowed": "Email domain not allowed",
|
|
29
|
+
"togglePasswordVisibility": "Show or hide password",
|
|
29
30
|
"layout": {
|
|
30
31
|
"default": {
|
|
31
32
|
"title": "Where user experience and DeFi meets.",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"signWithPasskey": "Entrar com uma passkey",
|
|
27
27
|
"continueApple": "Continuar com a Apple",
|
|
28
28
|
"emailDomainNotAllowed": "Domínio de e-mail não permitido",
|
|
29
|
+
"togglePasswordVisibility": "Mostrar ou ocultar senha",
|
|
29
30
|
"layout": {
|
|
30
31
|
"default": {
|
|
31
32
|
"title": "Onde a experiência do usuário e DeFi se encontram.",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"typeEmail": "Digite o e-mail que você forneceu para o"
|
|
43
44
|
},
|
|
44
45
|
"login": {
|
|
45
|
-
"login": "
|
|
46
|
+
"login": "Entrar",
|
|
46
47
|
"passkeyLogin": "Entrar com passkey",
|
|
47
48
|
"password": "Senha",
|
|
48
49
|
"continue": "Continuar",
|
|
@@ -54,8 +55,8 @@
|
|
|
54
55
|
"defaultError": "Não foi possível processar seu login neste momento. ",
|
|
55
56
|
"loginAccount": "Fazer login",
|
|
56
57
|
"enterEmail": "Digite seu e-mail",
|
|
57
|
-
"dontHaveAccount": "
|
|
58
|
-
"signUp": "
|
|
58
|
+
"dontHaveAccount": "Ainda não possui uma conta? ",
|
|
59
|
+
"signUp": "Cadastre-se",
|
|
59
60
|
"createAccount": "Criar uma account",
|
|
60
61
|
"enterPassword": "Coloque sua senha",
|
|
61
62
|
"verifyEmail": "Verifique seu e-mail",
|
|
@@ -83,7 +84,7 @@
|
|
|
83
84
|
"passkeyNotSupportedDescription": "A Passkey selecionada não é suportada no seu navegador.",
|
|
84
85
|
"noPasskey": "Nenhuma passkey encontrada",
|
|
85
86
|
"noPasskeyDescription": "Nenhuma passkey encontrada para sua conta.",
|
|
86
|
-
"forgotPassword": "Esqueceu sua senha?",
|
|
87
|
+
"forgotPassword": "Esqueceu sua senha? Clique aqui",
|
|
87
88
|
"errorCode": "Código de erro:",
|
|
88
89
|
"metamaskWalletConnect": "Metamask/WalletConnect"
|
|
89
90
|
},
|
|
@@ -97,14 +98,14 @@
|
|
|
97
98
|
"passkeyCreatedButNotAuthenticatedDescription": "Sua passkey foi criada, mas você precisa autenticar para completar o processo de autenticação.",
|
|
98
99
|
"backToLogin": "Voltar para login",
|
|
99
100
|
"forgeTitle": "Crie uma conta e resgate sua NFT",
|
|
100
|
-
"emailLabel": "
|
|
101
|
+
"emailLabel": "Insira seu e-mail",
|
|
101
102
|
"emailPlaceholder": "seuemail@email.com",
|
|
102
103
|
"emailInvitePlaceholder": "Este e-mail será seu login",
|
|
103
104
|
"nicknameLabel": "Nome ou apelido",
|
|
104
105
|
"agreeTermsPart1": "Eu concordo com os ",
|
|
105
106
|
"agreeTermsPart2": "termos de serviço",
|
|
106
|
-
"buttonStart": "
|
|
107
|
-
"alreadyHaveAccount": "Já
|
|
107
|
+
"buttonStart": "Criar conta",
|
|
108
|
+
"alreadyHaveAccount": "Já possui uma conta? ",
|
|
108
109
|
"loginHere": "Entre aqui",
|
|
109
110
|
"welcome": "Bem-vindo a Alore!",
|
|
110
111
|
"invitedBy": "Você foi convidado por",
|
|
@@ -32,6 +32,7 @@ export declare const dictionaries: {
|
|
|
32
32
|
signWithPasskey: string;
|
|
33
33
|
continueApple: string;
|
|
34
34
|
emailDomainNotAllowed: string;
|
|
35
|
+
togglePasswordVisibility: string;
|
|
35
36
|
layout: {
|
|
36
37
|
default: {
|
|
37
38
|
title: string;
|
|
@@ -184,6 +185,7 @@ export declare const dictionaries: {
|
|
|
184
185
|
signWithPasskey: string;
|
|
185
186
|
continueApple: string;
|
|
186
187
|
emailDomainNotAllowed: string;
|
|
188
|
+
togglePasswordVisibility: string;
|
|
187
189
|
layout: {
|
|
188
190
|
default: {
|
|
189
191
|
title: string;
|
|
@@ -337,6 +339,7 @@ export declare const getDictionary: (locale: Locale) => Promise<{
|
|
|
337
339
|
signWithPasskey: string;
|
|
338
340
|
continueApple: string;
|
|
339
341
|
emailDomainNotAllowed: string;
|
|
342
|
+
togglePasswordVisibility: string;
|
|
340
343
|
layout: {
|
|
341
344
|
default: {
|
|
342
345
|
title: string;
|
|
@@ -38,6 +38,14 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
|
|
|
38
38
|
accessToken: string;
|
|
39
39
|
providerName: string;
|
|
40
40
|
};
|
|
41
|
+
} | {
|
|
42
|
+
type: "SOCIAL_LOGIN";
|
|
43
|
+
payload: {
|
|
44
|
+
idToken: string;
|
|
45
|
+
providerName: string;
|
|
46
|
+
device?: string | undefined;
|
|
47
|
+
nonce?: string | undefined;
|
|
48
|
+
};
|
|
41
49
|
} | {
|
|
42
50
|
type: "START_PASSKEY_LOGIN";
|
|
43
51
|
payload: {
|
|
@@ -303,6 +311,14 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
|
|
|
303
311
|
accessToken: string;
|
|
304
312
|
providerName: string;
|
|
305
313
|
};
|
|
314
|
+
} | {
|
|
315
|
+
type: "SOCIAL_LOGIN";
|
|
316
|
+
payload: {
|
|
317
|
+
idToken: string;
|
|
318
|
+
providerName: string;
|
|
319
|
+
device?: string | undefined;
|
|
320
|
+
nonce?: string | undefined;
|
|
321
|
+
};
|
|
306
322
|
} | {
|
|
307
323
|
type: "START_PASSKEY_LOGIN";
|
|
308
324
|
payload: {
|
|
@@ -565,6 +581,14 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
|
|
|
565
581
|
accessToken: string;
|
|
566
582
|
providerName: string;
|
|
567
583
|
};
|
|
584
|
+
} | {
|
|
585
|
+
type: "SOCIAL_LOGIN";
|
|
586
|
+
payload: {
|
|
587
|
+
idToken: string;
|
|
588
|
+
providerName: string;
|
|
589
|
+
device?: string | undefined;
|
|
590
|
+
nonce?: string | undefined;
|
|
591
|
+
};
|
|
568
592
|
} | {
|
|
569
593
|
type: "START_PASSKEY_LOGIN";
|
|
570
594
|
payload: {
|
|
@@ -827,6 +851,14 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
|
|
|
827
851
|
accessToken: string;
|
|
828
852
|
providerName: string;
|
|
829
853
|
};
|
|
854
|
+
} | {
|
|
855
|
+
type: "SOCIAL_LOGIN";
|
|
856
|
+
payload: {
|
|
857
|
+
idToken: string;
|
|
858
|
+
providerName: string;
|
|
859
|
+
device?: string | undefined;
|
|
860
|
+
nonce?: string | undefined;
|
|
861
|
+
};
|
|
830
862
|
} | {
|
|
831
863
|
type: "START_PASSKEY_LOGIN";
|
|
832
864
|
payload: {
|
|
@@ -1089,6 +1121,14 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
|
|
|
1089
1121
|
accessToken: string;
|
|
1090
1122
|
providerName: string;
|
|
1091
1123
|
};
|
|
1124
|
+
} | {
|
|
1125
|
+
type: "SOCIAL_LOGIN";
|
|
1126
|
+
payload: {
|
|
1127
|
+
idToken: string;
|
|
1128
|
+
providerName: string;
|
|
1129
|
+
device?: string | undefined;
|
|
1130
|
+
nonce?: string | undefined;
|
|
1131
|
+
};
|
|
1092
1132
|
} | {
|
|
1093
1133
|
type: "START_PASSKEY_LOGIN";
|
|
1094
1134
|
payload: {
|
|
@@ -1354,6 +1394,14 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
|
|
|
1354
1394
|
accessToken: string;
|
|
1355
1395
|
providerName: string;
|
|
1356
1396
|
};
|
|
1397
|
+
} | {
|
|
1398
|
+
type: "SOCIAL_LOGIN";
|
|
1399
|
+
payload: {
|
|
1400
|
+
idToken: string;
|
|
1401
|
+
providerName: string;
|
|
1402
|
+
device?: string | undefined;
|
|
1403
|
+
nonce?: string | undefined;
|
|
1404
|
+
};
|
|
1357
1405
|
} | {
|
|
1358
1406
|
type: "START_PASSKEY_LOGIN";
|
|
1359
1407
|
payload: {
|
|
@@ -38,6 +38,14 @@ declare const useAuthServiceInstance: () => import("xstate").Interpreter<import(
|
|
|
38
38
|
accessToken: string;
|
|
39
39
|
providerName: string;
|
|
40
40
|
};
|
|
41
|
+
} | {
|
|
42
|
+
type: "SOCIAL_LOGIN";
|
|
43
|
+
payload: {
|
|
44
|
+
idToken: string;
|
|
45
|
+
providerName: string;
|
|
46
|
+
device?: string | undefined;
|
|
47
|
+
nonce?: string | undefined;
|
|
48
|
+
};
|
|
41
49
|
} | {
|
|
42
50
|
type: "START_PASSKEY_LOGIN";
|
|
43
51
|
payload: {
|
|
@@ -303,6 +311,14 @@ declare const useAuthServiceInstance: () => import("xstate").Interpreter<import(
|
|
|
303
311
|
accessToken: string;
|
|
304
312
|
providerName: string;
|
|
305
313
|
};
|
|
314
|
+
} | {
|
|
315
|
+
type: "SOCIAL_LOGIN";
|
|
316
|
+
payload: {
|
|
317
|
+
idToken: string;
|
|
318
|
+
providerName: string;
|
|
319
|
+
device?: string | undefined;
|
|
320
|
+
nonce?: string | undefined;
|
|
321
|
+
};
|
|
306
322
|
} | {
|
|
307
323
|
type: "START_PASSKEY_LOGIN";
|
|
308
324
|
payload: {
|
|
@@ -39,6 +39,14 @@ export declare const authMachine: import("xstate").StateMachine<AuthMachineConte
|
|
|
39
39
|
accessToken: string;
|
|
40
40
|
providerName: string;
|
|
41
41
|
};
|
|
42
|
+
} | {
|
|
43
|
+
type: "SOCIAL_LOGIN";
|
|
44
|
+
payload: {
|
|
45
|
+
idToken: string;
|
|
46
|
+
providerName: string;
|
|
47
|
+
device?: string | undefined;
|
|
48
|
+
nonce?: string | undefined;
|
|
49
|
+
};
|
|
42
50
|
} | {
|
|
43
51
|
type: "START_PASSKEY_LOGIN";
|
|
44
52
|
payload: {
|
|
@@ -304,6 +312,14 @@ export declare const authMachine: import("xstate").StateMachine<AuthMachineConte
|
|
|
304
312
|
accessToken: string;
|
|
305
313
|
providerName: string;
|
|
306
314
|
};
|
|
315
|
+
} | {
|
|
316
|
+
type: "SOCIAL_LOGIN";
|
|
317
|
+
payload: {
|
|
318
|
+
idToken: string;
|
|
319
|
+
providerName: string;
|
|
320
|
+
device?: string | undefined;
|
|
321
|
+
nonce?: string | undefined;
|
|
322
|
+
};
|
|
307
323
|
} | {
|
|
308
324
|
type: "START_PASSKEY_LOGIN";
|
|
309
325
|
payload: {
|
|
@@ -567,6 +583,14 @@ export declare const authService: (services: {}, context: AuthMachineContext) =>
|
|
|
567
583
|
accessToken: string;
|
|
568
584
|
providerName: string;
|
|
569
585
|
};
|
|
586
|
+
} | {
|
|
587
|
+
type: "SOCIAL_LOGIN";
|
|
588
|
+
payload: {
|
|
589
|
+
idToken: string;
|
|
590
|
+
providerName: string;
|
|
591
|
+
device?: string | undefined;
|
|
592
|
+
nonce?: string | undefined;
|
|
593
|
+
};
|
|
570
594
|
} | {
|
|
571
595
|
type: "START_PASSKEY_LOGIN";
|
|
572
596
|
payload: {
|
|
@@ -832,6 +856,14 @@ export declare const authService: (services: {}, context: AuthMachineContext) =>
|
|
|
832
856
|
accessToken: string;
|
|
833
857
|
providerName: string;
|
|
834
858
|
};
|
|
859
|
+
} | {
|
|
860
|
+
type: "SOCIAL_LOGIN";
|
|
861
|
+
payload: {
|
|
862
|
+
idToken: string;
|
|
863
|
+
providerName: string;
|
|
864
|
+
device?: string | undefined;
|
|
865
|
+
nonce?: string | undefined;
|
|
866
|
+
};
|
|
835
867
|
} | {
|
|
836
868
|
type: "START_PASSKEY_LOGIN";
|
|
837
869
|
payload: {
|
|
@@ -183,6 +183,7 @@ export const authMachine = createMachine({
|
|
|
183
183
|
on: {
|
|
184
184
|
LOGIN_WITH_WEB3CONNECTOR: '#authMachine.active.web3Connector',
|
|
185
185
|
GOOGLE_LOGIN: 'googleLogin',
|
|
186
|
+
SOCIAL_LOGIN: 'socialLogin',
|
|
186
187
|
ADVANCE_TO_PASSWORD: 'inputPassword',
|
|
187
188
|
SIGN_IN_WITH_PASSKEY: '#authMachine.active.login.idle.signWithPasskey',
|
|
188
189
|
SELECT_PASSWORD_METHOD: [
|
|
@@ -651,6 +652,36 @@ export const authMachine = createMachine({
|
|
|
651
652
|
},
|
|
652
653
|
],
|
|
653
654
|
},
|
|
655
|
+
socialLogin: {
|
|
656
|
+
invoke: {
|
|
657
|
+
src: 'socialLogin',
|
|
658
|
+
onDone: [
|
|
659
|
+
{
|
|
660
|
+
// 201: the backend created the account on this call, so
|
|
661
|
+
// the consuming app must see onRegister, not onLogin.
|
|
662
|
+
target: '#authMachine.active.register.userCreated',
|
|
663
|
+
actions: 'setSocialSessionUser',
|
|
664
|
+
cond: 'isNewUser',
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
target: 'successfulLogin',
|
|
668
|
+
actions: 'setSocialSessionUser',
|
|
669
|
+
},
|
|
670
|
+
],
|
|
671
|
+
onError: {
|
|
672
|
+
target: 'idle',
|
|
673
|
+
actions: assign((ctx, event) => ({
|
|
674
|
+
error: {
|
|
675
|
+
code: event.data?.type,
|
|
676
|
+
message: event.data?.type === 'EMAIL_DOMAIN_NOT_ALLOWED'
|
|
677
|
+
? 'EMAIL_DOMAIN_NOT_ALLOWED'
|
|
678
|
+
: event.data?.message || event.data?.error || event.data,
|
|
679
|
+
email: ctx.credentialEmail,
|
|
680
|
+
},
|
|
681
|
+
})),
|
|
682
|
+
},
|
|
683
|
+
},
|
|
684
|
+
},
|
|
654
685
|
googleLogin: {
|
|
655
686
|
invoke: {
|
|
656
687
|
src: 'googleLogin',
|
|
@@ -818,6 +849,10 @@ export const authMachine = createMachine({
|
|
|
818
849
|
actions: 'setupRegisterUser',
|
|
819
850
|
},
|
|
820
851
|
GOOGLE_LOGIN: 'googleLogin',
|
|
852
|
+
// Signing up with Google enters the SAME state as login: the backend's
|
|
853
|
+
// 201-vs-200 answer decides whether this ends in register.userCreated
|
|
854
|
+
// or successfulLogin, so the entry point does not need its own branch.
|
|
855
|
+
SOCIAL_LOGIN: '#authMachine.active.login.socialLogin',
|
|
821
856
|
SEND_REGISTRATION_EMAIL: {
|
|
822
857
|
target: 'sendingEmail',
|
|
823
858
|
actions: assign({
|
|
@@ -1392,6 +1427,9 @@ export const authMachine = createMachine({
|
|
|
1392
1427
|
fetchForgeData: async (_, event) => {
|
|
1393
1428
|
throw new Error('Not implemented');
|
|
1394
1429
|
},
|
|
1430
|
+
socialLogin: async (_, event) => {
|
|
1431
|
+
throw new Error('Not implemented');
|
|
1432
|
+
},
|
|
1395
1433
|
googleLogin: async (_, event) => {
|
|
1396
1434
|
throw new Error('Not implemented');
|
|
1397
1435
|
},
|
|
@@ -1440,6 +1478,13 @@ export const authMachine = createMachine({
|
|
|
1440
1478
|
setSessionUser: assign({
|
|
1441
1479
|
sessionUser: (_, event) => event.data,
|
|
1442
1480
|
}),
|
|
1481
|
+
// socialLogin resolves { sessionUser, isNewUser } rather than the user
|
|
1482
|
+
// itself, because the 201-vs-200 distinction drives which callback the
|
|
1483
|
+
// consuming app sees. Unwrap it, or every reader of sessionUser gets the
|
|
1484
|
+
// envelope and reads undefined off it.
|
|
1485
|
+
setSocialSessionUser: assign({
|
|
1486
|
+
sessionUser: (_, event) => event.data?.sessionUser,
|
|
1487
|
+
}),
|
|
1443
1488
|
setupRegisterUser: assign({
|
|
1444
1489
|
registerUser: (_, event) => event?.registerUser || undefined,
|
|
1445
1490
|
}),
|