@joelbarron/react-web-dev-kit 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/auth/client.d.ts +2 -1
  2. package/dist/auth/client.d.ts.map +1 -1
  3. package/dist/auth/client.js +14 -1
  4. package/dist/auth/forms/account/AuthAccountConfirmationForm.d.ts.map +1 -1
  5. package/dist/auth/forms/account/AuthAccountConfirmationForm.js +3 -2
  6. package/dist/auth/forms/password/AuthForgotPasswordForm.d.ts +4 -0
  7. package/dist/auth/forms/password/AuthForgotPasswordForm.d.ts.map +1 -1
  8. package/dist/auth/forms/password/AuthForgotPasswordForm.js +43 -5
  9. package/dist/auth/forms/password/AuthPasswordResetConfirmForm.d.ts +2 -0
  10. package/dist/auth/forms/password/AuthPasswordResetConfirmForm.d.ts.map +1 -1
  11. package/dist/auth/forms/password/AuthPasswordResetConfirmForm.js +84 -9
  12. package/dist/auth/forms/password/AuthResetPasswordForm.d.ts.map +1 -1
  13. package/dist/auth/forms/password/AuthResetPasswordForm.js +5 -1
  14. package/dist/auth/forms/password/passwordValidation.d.ts +3 -0
  15. package/dist/auth/forms/password/passwordValidation.d.ts.map +1 -0
  16. package/dist/auth/forms/password/passwordValidation.js +45 -0
  17. package/dist/auth/forms/sign-in/AuthOtpSignInForm.d.ts.map +1 -1
  18. package/dist/auth/forms/sign-in/AuthOtpSignInForm.js +2 -1
  19. package/dist/auth/forms/sign-in/AuthPasswordSignInForm.d.ts +1 -0
  20. package/dist/auth/forms/sign-in/AuthPasswordSignInForm.d.ts.map +1 -1
  21. package/dist/auth/forms/sign-in/AuthPasswordSignInForm.js +36 -8
  22. package/dist/auth/forms/sign-up/AuthSignUpForm.d.ts +1 -0
  23. package/dist/auth/forms/sign-up/AuthSignUpForm.d.ts.map +1 -1
  24. package/dist/auth/forms/sign-up/AuthSignUpForm.js +33 -7
  25. package/dist/auth/fuse/createFuseAuthViews.d.ts +1 -0
  26. package/dist/auth/fuse/createFuseAuthViews.d.ts.map +1 -1
  27. package/dist/auth/fuse/createFuseAuthViews.js +157 -63
  28. package/dist/auth/fuse/fuseAdapter.d.ts +2 -1
  29. package/dist/auth/fuse/fuseAdapter.d.ts.map +1 -1
  30. package/dist/auth/fuse/fuseAdapter.js +6 -0
  31. package/dist/auth/routes.d.ts.map +1 -1
  32. package/dist/auth/routes.js +3 -1
  33. package/dist/auth/social/providerAuth.d.ts +10 -1
  34. package/dist/auth/social/providerAuth.d.ts.map +1 -1
  35. package/dist/auth/social/providerAuth.js +42 -1
  36. package/dist/auth/types.d.ts +18 -0
  37. package/dist/auth/types.d.ts.map +1 -1
  38. package/dist/auth/ui/AuthPageTitle.d.ts +7 -0
  39. package/dist/auth/ui/AuthPageTitle.d.ts.map +1 -0
  40. package/dist/auth/ui/AuthPageTitle.js +7 -0
  41. package/dist/auth/ui/AuthPrimaryButton.js +3 -3
  42. package/dist/auth/ui/AuthRoutePageWrapper.d.ts.map +1 -1
  43. package/dist/auth/ui/AuthRoutePageWrapper.js +17 -12
  44. package/dist/auth/ui/AuthSocialProviderButton.d.ts +1 -1
  45. package/dist/auth/ui/AuthSocialProviderButton.d.ts.map +1 -1
  46. package/dist/auth/ui/AuthSocialProviderButton.js +5 -2
  47. package/dist/auth/ui/SignInPageTitle.js +1 -1
  48. package/dist/auth/ui/index.d.ts +1 -3
  49. package/dist/auth/ui/index.d.ts.map +1 -1
  50. package/dist/auth/ui/index.js +1 -3
  51. package/dist/config/createConfig.d.ts +1 -0
  52. package/dist/config/createConfig.d.ts.map +1 -1
  53. package/dist/config/createConfig.js +4 -0
  54. package/dist/config/defaults.d.ts.map +1 -1
  55. package/dist/config/defaults.js +1 -0
  56. package/dist/config/types.d.ts +1 -0
  57. package/dist/config/types.d.ts.map +1 -1
  58. package/dist/forms/JBDatePickerField.d.ts.map +1 -1
  59. package/dist/forms/JBDatePickerField.js +4 -2
  60. package/dist/forms/JBSelectField.d.ts.map +1 -1
  61. package/dist/forms/JBSelectField.js +2 -2
  62. package/dist/forms/JBTextField.d.ts.map +1 -1
  63. package/dist/forms/JBTextField.js +2 -2
  64. package/dist/forms/JBTimePickerField.d.ts.map +1 -1
  65. package/dist/forms/JBTimePickerField.js +4 -2
  66. package/package.json +1 -1
@@ -22,6 +22,7 @@ export type AuthSignUpFormValues = z.infer<typeof signUpSchema>;
22
22
  export type AuthSignUpFormProps = {
23
23
  defaultValues?: Partial<AuthSignUpFormValues>;
24
24
  loading?: boolean;
25
+ disabled?: boolean;
25
26
  submitLabel?: string;
26
27
  fieldsScrollable?: boolean;
27
28
  formMaxHeight?: string | number;
@@ -1 +1 @@
1
- {"version":3,"file":"AuthSignUpForm.d.ts","sourceRoot":"","sources":["../../../../src/auth/forms/sign-up/AuthSignUpForm.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAA+C,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3F,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAI9C,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;iBAmBd,CAAC;AAEL,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,WAAW,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACnE,CAAC;AAeF,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAiRxD"}
1
+ {"version":3,"file":"AuthSignUpForm.d.ts","sourceRoot":"","sources":["../../../../src/auth/forms/sign-up/AuthSignUpForm.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAA+C,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3F,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAK9C,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;iBAkCd,CAAC;AAEL,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,WAAW,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACnE,CAAC;AAeF,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAuTxD"}
@@ -1,14 +1,20 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { zodResolver } from '@hookform/resolvers/zod';
3
+ import PersonAddAlt1OutlinedIcon from '@mui/icons-material/PersonAddAlt1Outlined';
4
+ import VisibilityOffOutlinedIcon from '@mui/icons-material/VisibilityOffOutlined';
5
+ import VisibilityOutlinedIcon from '@mui/icons-material/VisibilityOutlined';
3
6
  import Alert from '@mui/material/Alert';
4
7
  import Box from '@mui/material/Box';
8
+ import IconButton from '@mui/material/IconButton';
9
+ import InputAdornment from '@mui/material/InputAdornment';
5
10
  import _ from 'lodash';
6
- import { useEffect } from 'react';
11
+ import { useEffect, useState } from 'react';
7
12
  import { useForm, useWatch } from 'react-hook-form';
8
13
  import { z } from 'zod';
9
14
  import { JBCheckboxField, JBSelectField, JBTextField } from '../../../forms';
10
15
  import { DEFAULT_GENDER, GENDERS, GENDER_SELECT_OPTIONS } from '../../constants';
11
16
  import { AuthPrimaryButton } from '../../ui';
17
+ import { getDjangoLikePasswordError, isPasswordTooSimilar } from '../password/passwordValidation';
12
18
  import { parseAuthError } from '../errorParser';
13
19
  const signUpSchema = z
14
20
  .object({
@@ -19,16 +25,30 @@ const signUpSchema = z
19
25
  birthday: z.string().optional(),
20
26
  gender: z.enum(GENDERS).optional(),
21
27
  role: z.string().optional(),
22
- password: z
23
- .string()
24
- .nonempty('Debes ingresar la contraseña.')
25
- .min(8, 'La contraseña es muy corta - mínimo 8 caracteres.'),
28
+ password: z.string().nonempty('Debes ingresar la contraseña.'),
26
29
  passwordConfirm: z.string().nonempty('La confirmación de contraseña es obligatoria'),
27
30
  acceptTermsConditions: z.boolean().refine((val) => val === true, 'Debes aceptar los términos y condiciones.')
28
31
  })
29
32
  .refine((data) => data.password === data.passwordConfirm, {
30
33
  message: 'Las contraseñas deben coincidir',
31
34
  path: ['passwordConfirm']
35
+ })
36
+ .superRefine((data, ctx) => {
37
+ const passwordError = getDjangoLikePasswordError(data.password);
38
+ if (passwordError) {
39
+ ctx.addIssue({
40
+ code: z.ZodIssueCode.custom,
41
+ message: passwordError,
42
+ path: ['password']
43
+ });
44
+ }
45
+ if (isPasswordTooSimilar(data.password, [data.email, data.firstName, data.lastName1, data.lastName2])) {
46
+ ctx.addIssue({
47
+ code: z.ZodIssueCode.custom,
48
+ message: 'La contraseña es demasiado similar a tus datos personales.',
49
+ path: ['password']
50
+ });
51
+ }
32
52
  });
33
53
  const defaultValues = {
34
54
  firstName: '',
@@ -43,7 +63,7 @@ const defaultValues = {
43
63
  acceptTermsConditions: false
44
64
  };
45
65
  export function AuthSignUpForm(props) {
46
- const { defaultValues: valuesFromProps, loading = false, submitLabel = 'Crear cuenta', fieldsScrollable = false, formMaxHeight = 'min(72dvh, 620px)', roleOptions, defaultRole, onSubmit } = props;
66
+ const { defaultValues: valuesFromProps, loading = false, disabled = false, submitLabel = 'Crear cuenta', fieldsScrollable = false, formMaxHeight = 'min(72dvh, 620px)', roleOptions, defaultRole, onSubmit } = props;
47
67
  const signupRoleOptions = (roleOptions ?? []).filter((roleOption) => roleOption.allowSignup !== false);
48
68
  const resolvedDefaultRole = valuesFromProps?.role ??
49
69
  defaultRole ??
@@ -62,6 +82,8 @@ export function AuthSignUpForm(props) {
62
82
  const isLoading = loading || isSubmitting;
63
83
  const passwordValue = useWatch({ control, name: 'password' });
64
84
  const passwordConfirmValue = useWatch({ control, name: 'passwordConfirm' });
85
+ const [showPassword, setShowPassword] = useState(false);
86
+ const [showPasswordConfirm, setShowPasswordConfirm] = useState(false);
65
87
  useEffect(() => {
66
88
  if (!passwordConfirmValue) {
67
89
  return;
@@ -160,5 +182,9 @@ export function AuthSignUpForm(props) {
160
182
  pb: 1
161
183
  }
162
184
  : null)
163
- }, children: [_jsx(JBTextField, { control: control, name: "firstName", sx: { mb: 3 }, label: "Nombre(s)", autoFocus: true, type: "text", variant: "outlined", required: true, fullWidth: true }), _jsx(JBTextField, { control: control, name: "lastName1", sx: { mb: 3 }, label: "Primer apellido", type: "text", variant: "outlined", required: true, fullWidth: true }), _jsx(JBTextField, { control: control, name: "lastName2", sx: { mb: 3 }, label: "Segundo apellido", type: "text", variant: "outlined", fullWidth: true }), _jsx(JBTextField, { control: control, name: "email", sx: { mb: 3 }, label: "Correo electr\u00F3nico", type: "email", variant: "outlined", required: true, fullWidth: true }), _jsx(JBTextField, { control: control, name: "birthday", sx: { mb: 3 }, label: "Fecha de nacimiento", type: "date", InputLabelProps: { shrink: true }, variant: "outlined", fullWidth: true }), _jsx(JBSelectField, { control: control, name: "gender", sx: { mb: 3 }, label: "G\u00E9nero", variant: "outlined", fullWidth: true, options: GENDER_SELECT_OPTIONS }), signupRoleOptions.length > 0 ? (_jsx(JBSelectField, { control: control, name: "role", sx: { mb: 3 }, label: "Rol de perfil", variant: "outlined", fullWidth: true, options: signupRoleOptions, required: true })) : null, _jsx(JBTextField, { control: control, name: "password", sx: { mb: 3 }, label: "Contrase\u00F1a", type: "password", variant: "outlined", required: true, fullWidth: true }), _jsx(JBTextField, { control: control, name: "passwordConfirm", sx: { mb: 3 }, label: "Confirmar contrase\u00F1a", type: "password", variant: "outlined", required: true, fullWidth: true }), _jsx(JBCheckboxField, { control: control, name: "acceptTermsConditions", size: "small", label: "Acepto t\u00E9rminos y pol\u00EDticas de privacidad" })] }), errors.root?.message ? (_jsx(Alert, { sx: { mt: 2 }, severity: "error", children: errors.root.message })) : null, _jsx(AuthPrimaryButton, { sx: { mt: 3 }, "aria-label": submitLabel, disabled: isLoading || _.isEmpty(dirtyFields) || !isValid, loading: isLoading, loadingLabel: "Creando cuenta...", type: "submit", size: "large", children: submitLabel })] }));
185
+ }, children: [_jsx(JBTextField, { control: control, name: "firstName", sx: { mb: 3 }, label: "Nombre(s)", autoFocus: true, type: "text", variant: "outlined", required: true, fullWidth: true, disabled: disabled }), _jsx(JBTextField, { control: control, name: "lastName1", sx: { mb: 3 }, label: "Primer apellido", type: "text", variant: "outlined", required: true, fullWidth: true, disabled: disabled }), _jsx(JBTextField, { control: control, name: "lastName2", sx: { mb: 3 }, label: "Segundo apellido", type: "text", variant: "outlined", fullWidth: true, disabled: disabled }), _jsx(JBTextField, { control: control, name: "email", sx: { mb: 3 }, label: "Correo electr\u00F3nico", type: "email", variant: "outlined", required: true, fullWidth: true, disabled: disabled }), _jsx(JBTextField, { control: control, name: "birthday", sx: { mb: 3 }, label: "Fecha de nacimiento", type: "date", InputLabelProps: { shrink: true }, variant: "outlined", fullWidth: true, disabled: disabled }), _jsx(JBSelectField, { control: control, name: "gender", sx: { mb: 3 }, label: "G\u00E9nero", variant: "outlined", fullWidth: true, options: GENDER_SELECT_OPTIONS, disabled: disabled }), signupRoleOptions.length > 0 ? (_jsx(JBSelectField, { control: control, name: "role", sx: { mb: 3 }, label: "Rol de perfil", variant: "outlined", fullWidth: true, options: signupRoleOptions, required: true, disabled: disabled })) : null, _jsx(JBTextField, { control: control, name: "password", sx: { mb: 3 }, label: "Contrase\u00F1a", type: showPassword ? 'text' : 'password', InputProps: {
186
+ endAdornment: (_jsx(InputAdornment, { position: "end", children: _jsx(IconButton, { edge: "end", "aria-label": showPassword ? 'Ocultar contraseña' : 'Mostrar contraseña', onClick: () => setShowPassword((prev) => !prev), children: showPassword ? _jsx(VisibilityOffOutlinedIcon, {}) : _jsx(VisibilityOutlinedIcon, {}) }) }))
187
+ }, variant: "outlined", required: true, fullWidth: true, disabled: disabled }), _jsx(JBTextField, { control: control, name: "passwordConfirm", sx: { mb: 3 }, label: "Confirmar contrase\u00F1a", type: showPasswordConfirm ? 'text' : 'password', InputProps: {
188
+ endAdornment: (_jsx(InputAdornment, { position: "end", children: _jsx(IconButton, { edge: "end", "aria-label": showPasswordConfirm ? 'Ocultar confirmación de contraseña' : 'Mostrar confirmación de contraseña', onClick: () => setShowPasswordConfirm((prev) => !prev), children: showPasswordConfirm ? _jsx(VisibilityOffOutlinedIcon, {}) : _jsx(VisibilityOutlinedIcon, {}) }) }))
189
+ }, variant: "outlined", required: true, fullWidth: true, disabled: disabled }), _jsx(JBCheckboxField, { control: control, name: "acceptTermsConditions", size: "small", label: "Acepto t\u00E9rminos y pol\u00EDticas de privacidad", disabled: disabled })] }), errors.root?.message ? (_jsx(Alert, { sx: { mt: 2 }, severity: "error", children: errors.root.message })) : null, _jsx(AuthPrimaryButton, { sx: { mt: 3 }, "aria-label": submitLabel, disabled: disabled || isLoading || _.isEmpty(dirtyFields) || !isValid, loading: isLoading, loadingLabel: "Creando cuenta...", startIcon: _jsx(PersonAddAlt1OutlinedIcon, { fontSize: "small" }), type: "submit", size: "large", children: submitLabel })] }));
164
190
  }
@@ -6,6 +6,7 @@ type CreateFuseAuthViewsOptions = {
6
6
  signUpRoleOptions?: JBAuthProfileRoleOption[];
7
7
  defaultSignUpRole?: string;
8
8
  socialConfig?: JBAuthSocialConfig;
9
+ showDebugSocial?: boolean;
9
10
  onSignUpSuccess?: (values: {
10
11
  email: string;
11
12
  detail?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"createFuseAuthViews.d.ts","sourceRoot":"","sources":["../../../src/auth/fuse/createFuseAuthViews.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAG3E,OAAO,EACL,iBAAiB,EAOlB,MAAM,OAAO,CAAC;AAibf,KAAK,0BAA0B,GAAG;IAChC,aAAa,EAAE,iBAAiB,CAAC;IACjC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,iBAAiB,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC9C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE;QACzB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,KAAK,IAAI,CAAC;CACZ,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;;;;;;;EAwYtE"}
1
+ {"version":3,"file":"createFuseAuthViews.d.ts","sourceRoot":"","sources":["../../../src/auth/fuse/createFuseAuthViews.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAY3E,OAAO,EACL,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AA4hBf,KAAK,0BAA0B,GAAG;IAChC,aAAa,EAAE,iBAAiB,CAAC;IACjC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,iBAAiB,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC9C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE;QACzB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,KAAK,IAAI,CAAC;CACZ,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;;;;;;;EAuYtE"}
@@ -1,15 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import Box from "@mui/material/Box";
2
+ import ArrowBackOutlinedIcon from '@mui/icons-material/ArrowBackOutlined';
3
+ import EmailOutlinedIcon from '@mui/icons-material/EmailOutlined';
4
+ import PersonAddAlt1OutlinedIcon from '@mui/icons-material/PersonAddAlt1Outlined';
3
5
  import Alert from "@mui/material/Alert";
6
+ import Box from "@mui/material/Box";
4
7
  import Typography from "@mui/material/Typography";
5
- import PhoneIphoneIcon from "@mui/icons-material/PhoneIphone";
6
8
  import { useCallback, useMemo, useRef, useState } from "react";
7
9
  import { useNavigate, useSearchParams } from "react-router";
8
10
  import { AuthAccountConfirmationForm, AuthForgotPasswordForm, AuthOtpSignInForm, AuthPasswordResetConfirmForm, AuthPasswordSignInForm, AuthSignUpForm, } from "../forms";
11
+ import { parseAuthError } from "../forms/errorParser";
9
12
  import { authenticateWithSocialProvider } from "../social/providerAuth";
13
+ import { AuthPageTitle, AuthRoleSelectionDialog, AuthSecondaryButton, AuthSocialProviderButton, } from "../ui";
10
14
  import { useFuseJwtAuth } from "./fuseAdapter";
11
- import { AuthRoleSelectionDialog, AuthSocialProviderButton, AuthSecondaryButton, SignInPageTitle, SignOutPageTitle, SignUpPageTitle, } from "../ui";
12
- import { parseAuthError } from "../forms/errorParser";
13
15
  const IS_DEV = typeof window !== "undefined" && window.location.hostname === "localhost";
14
16
  const DEV_LOGIN_DEFAULT_VALUES = IS_DEV
15
17
  ? {
@@ -39,7 +41,56 @@ const DEV_OTP_DEFAULT_VALUES = IS_DEV
39
41
  }
40
42
  : undefined;
41
43
  const SOCIAL_PROVIDER_ORDER = ["google", "facebook", "apple"];
42
- function getEnabledSocialProviders(socialConfig) {
44
+ const parseBooleanLike = (value) => {
45
+ if (typeof value === "boolean") {
46
+ return value;
47
+ }
48
+ if (typeof value === "string") {
49
+ const normalized = value.trim().toLowerCase();
50
+ if (normalized === "true") {
51
+ return true;
52
+ }
53
+ if (normalized === "false") {
54
+ return false;
55
+ }
56
+ }
57
+ if (typeof value === "number") {
58
+ if (value === 1) {
59
+ return true;
60
+ }
61
+ if (value === 0) {
62
+ return false;
63
+ }
64
+ }
65
+ return undefined;
66
+ };
67
+ const shouldSelectRoleForSocialLogin = (precheckResponse, hasRoleOptions) => {
68
+ if (!hasRoleOptions) {
69
+ return false;
70
+ }
71
+ const userExists = parseBooleanLike(precheckResponse.userExists) ??
72
+ parseBooleanLike(precheckResponse.user_exists);
73
+ if (typeof userExists === "boolean") {
74
+ return !userExists;
75
+ }
76
+ const wouldCreateUser = parseBooleanLike(precheckResponse.wouldCreateUser) ??
77
+ parseBooleanLike(precheckResponse.would_create_user);
78
+ if (typeof wouldCreateUser === "boolean") {
79
+ return wouldCreateUser;
80
+ }
81
+ const socialAccountExists = parseBooleanLike(precheckResponse.socialAccountExists) ??
82
+ parseBooleanLike(precheckResponse.social_account_exists);
83
+ if (socialAccountExists === true) {
84
+ return false;
85
+ }
86
+ const linkedExistingUser = parseBooleanLike(precheckResponse.linkedExistingUser) ??
87
+ parseBooleanLike(precheckResponse.linked_existing_user);
88
+ if (linkedExistingUser === true) {
89
+ return false;
90
+ }
91
+ return hasRoleOptions;
92
+ };
93
+ function getEnabledSocialProviders(socialConfig, showDebugSocial) {
43
94
  if (!socialConfig) {
44
95
  return [];
45
96
  }
@@ -59,13 +110,14 @@ function getEnabledSocialProviders(socialConfig) {
59
110
  responseMode: providerConfig.responseMode,
60
111
  responseType: providerConfig.responseType,
61
112
  state: providerConfig.state,
62
- nonce: providerConfig.nonce
113
+ nonce: providerConfig.nonce,
114
+ debug: showDebugSocial
63
115
  }
64
116
  ];
65
117
  });
66
118
  }
67
119
  function FuseSignInController(props) {
68
- const { LinkComponent, mode = "password", onBackToPassword, requestRoleSelection } = props;
120
+ const { LinkComponent, mode = "password", disabled = false, onBackToPassword, requestRoleSelection } = props;
69
121
  const { signIn, requestOtp, signInOtp } = useFuseJwtAuth();
70
122
  if (mode === "otp") {
71
123
  return (_jsx(AuthOtpSignInForm, { defaultValues: DEV_OTP_DEFAULT_VALUES, requestRoleSelection: requestRoleSelection, onBackToPassword: onBackToPassword, onRequestOtp: ({ phone }) => requestOtp({
@@ -78,15 +130,15 @@ function FuseSignInController(props) {
78
130
  role,
79
131
  }) }));
80
132
  }
81
- return (_jsx(AuthPasswordSignInForm, { defaultValues: DEV_LOGIN_DEFAULT_VALUES, LinkComponent: LinkComponent, onSubmit: (values) => signIn({
133
+ return (_jsx(AuthPasswordSignInForm, { defaultValues: DEV_LOGIN_DEFAULT_VALUES, disabled: disabled, LinkComponent: LinkComponent, onSubmit: (values) => signIn({
82
134
  login: values.login,
83
135
  password: values.password,
84
136
  }) }));
85
137
  }
86
138
  function FuseSignUpController(props) {
87
- const { onSuccess, requestRoleSelection, requiresRoleSelection = false } = props;
139
+ const { onSuccess, requestRoleSelection, requiresRoleSelection = false, disabled = false } = props;
88
140
  const { signUp } = useFuseJwtAuth();
89
- return (_jsx(AuthSignUpForm, { defaultValues: DEV_SIGN_UP_DEFAULT_VALUES, onSubmit: async (values) => {
141
+ return (_jsx(AuthSignUpForm, { defaultValues: DEV_SIGN_UP_DEFAULT_VALUES, disabled: disabled, onSubmit: async (values) => {
90
142
  const selectedRole = requestRoleSelection
91
143
  ? await requestRoleSelection()
92
144
  : values.role;
@@ -119,32 +171,42 @@ function FuseOtpSignUpForm(props) {
119
171
  }
120
172
  function FuseAuthAlternativesSection(props) {
121
173
  const { onSmsClick, socialProviders = [], onSocialClick, socialLoadingProvider, socialError } = props;
122
- return (_jsxs(_Fragment, { children: [_jsxs(Box, { sx: { mt: 4, display: "flex", alignItems: "center" }, children: [_jsx(Box, { sx: { mt: "1px", flex: 1, borderTop: 1, borderColor: "divider" } }), _jsx(Typography, { sx: { mx: 1 }, color: "text.secondary", children: "O contin\u00FAa con" }), _jsx(Box, { sx: { mt: "1px", flex: 1, borderTop: 1, borderColor: "divider" } })] }), _jsxs(Box, { sx: {
174
+ return (_jsxs(_Fragment, { children: [_jsxs(Box, { sx: { mt: 4, display: "flex", alignItems: "center" }, children: [_jsx(Box, { sx: { mt: "1px", flex: 1, borderTop: 1, borderColor: "divider" } }), _jsx(Typography, { sx: { mx: 1 }, color: "text.secondary", children: "O accede con" }), _jsx(Box, { sx: { mt: "1px", flex: 1, borderTop: 1, borderColor: "divider" } })] }), _jsxs(Box, { sx: {
123
175
  mt: 4,
124
176
  display: "grid",
125
177
  gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
126
178
  gap: 1.5
127
- }, children: [socialProviders.map((socialProvider) => (_jsx(AuthSocialProviderButton, { provider: socialProvider.provider, loading: socialLoadingProvider === socialProvider.provider, disabled: Boolean(socialLoadingProvider && socialLoadingProvider !== socialProvider.provider), onClick: () => onSocialClick?.(socialProvider.provider) }, socialProvider.provider))), _jsx(AuthSecondaryButton, { sx: { minWidth: 0 }, "aria-label": "SMS", onClick: onSmsClick, startIcon: _jsx(PhoneIphoneIcon, { fontSize: "small" }), children: "SMS" })] }), socialError ? (_jsx(Alert, { severity: "error", sx: { mt: 2 }, children: socialError })) : null] }));
179
+ }, children: [socialProviders.map((socialProvider) => (_jsx(AuthSocialProviderButton, { provider: socialProvider.provider, loading: socialLoadingProvider === socialProvider.provider, disabled: Boolean(socialLoadingProvider && socialLoadingProvider !== socialProvider.provider), onClick: () => onSocialClick?.(socialProvider.provider) }, socialProvider.provider))), _jsx(AuthSocialProviderButton, { "aria-label": "SMS", provider: "sms", disabled: Boolean(socialLoadingProvider), onClick: onSmsClick, children: "SMS" })] }), socialError ? (_jsx(Alert, { severity: "error", sx: { mt: 2 }, children: socialError })) : null] }));
128
180
  }
129
181
  function FuseSignUpCtaSection(props) {
130
- const { LinkComponent, signUpPath = "/sign-up" } = props;
131
- return (_jsxs(_Fragment, { children: [_jsxs(Box, { sx: { mt: 6, display: "flex", alignItems: "center" }, children: [_jsx(Box, { sx: { mt: "1px", flex: 1, borderTop: 1, borderColor: "divider" } }), _jsx(Typography, { sx: { mx: 1 }, color: "text.secondary", children: "\u00BFNo tienes una cuenta?" }), _jsx(Box, { sx: { mt: "1px", flex: 1, borderTop: 1, borderColor: "divider" } })] }), _jsx(Box, { sx: { mt: 2, display: "flex", alignItems: "center", gap: 2 }, children: _jsx(AuthSecondaryButton, { component: LinkComponent, to: signUpPath, sx: { flex: 1 }, "aria-label": "Crear cuenta", children: "Crear cuenta" }) })] }));
182
+ const { LinkComponent, signUpPath = "/sign-up", disabled = false } = props;
183
+ return (_jsxs(_Fragment, { children: [_jsxs(Box, { sx: { mt: 6, display: "flex", alignItems: "center" }, children: [_jsx(Box, { sx: { mt: "1px", flex: 1, borderTop: 1, borderColor: "divider" } }), _jsx(Typography, { sx: { mx: 1 }, color: "text.secondary", children: "\u00BFNo tienes una cuenta?" }), _jsx(Box, { sx: { mt: "1px", flex: 1, borderTop: 1, borderColor: "divider" } })] }), _jsx(Box, { sx: { mt: 2, display: "flex", alignItems: "center", gap: 2 }, children: _jsx(AuthSecondaryButton, { component: LinkComponent, to: signUpPath, sx: { flex: 1 }, disabled: disabled, startIcon: _jsx(PersonAddAlt1OutlinedIcon, { fontSize: "small" }), onClick: (event) => {
184
+ if (disabled) {
185
+ event.preventDefault();
186
+ }
187
+ }, "aria-label": "Crear cuenta", children: "Crear cuenta" }) })] }));
132
188
  }
133
189
  function FuseSignInCtaSection(props) {
134
- const { LinkComponent, signInPath = "/sign-in" } = props;
135
- return (_jsxs(_Fragment, { children: [_jsxs(Box, { sx: { mt: 6, display: "flex", alignItems: "center" }, children: [_jsx(Box, { sx: { mt: "1px", flex: 1, borderTop: 1, borderColor: "divider" } }), _jsx(Typography, { sx: { mx: 1 }, color: "text.secondary", children: "\u00BFYa tienes una cuenta?" }), _jsx(Box, { sx: { mt: "1px", flex: 1, borderTop: 1, borderColor: "divider" } })] }), _jsx(Box, { sx: { mt: 2, display: "flex", alignItems: "center", gap: 2 }, children: _jsx(AuthSecondaryButton, { component: LinkComponent, to: signInPath, sx: { flex: 1 }, "aria-label": "Iniciar sesi\u00F3n", children: "Iniciar sesi\u00F3n" }) })] }));
190
+ const { LinkComponent, signInPath = "/sign-in", disabled = false } = props;
191
+ return (_jsxs(_Fragment, { children: [_jsxs(Box, { sx: { mt: 6, display: "flex", alignItems: "center" }, children: [_jsx(Box, { sx: { mt: "1px", flex: 1, borderTop: 1, borderColor: "divider" } }), _jsx(Typography, { sx: { mx: 1 }, color: "text.secondary", children: "\u00BFYa tienes una cuenta?" }), _jsx(Box, { sx: { mt: "1px", flex: 1, borderTop: 1, borderColor: "divider" } })] }), _jsx(Box, { sx: { mt: 2, display: "flex", alignItems: "center", gap: 2 }, children: _jsx(AuthSecondaryButton, { component: LinkComponent, to: signInPath, sx: { flex: 1 }, disabled: disabled, startIcon: _jsx(EmailOutlinedIcon, { fontSize: "small" }), onClick: (event) => {
192
+ if (disabled) {
193
+ event.preventDefault();
194
+ }
195
+ }, "aria-label": "Iniciar sesi\u00F3n", children: "Iniciar sesi\u00F3n" }) })] }));
136
196
  }
137
- function FuseForgotPasswordPageForm() {
197
+ function FuseForgotPasswordPageForm(props) {
198
+ const { LinkComponent } = props;
138
199
  const { requestPasswordReset } = useFuseJwtAuth();
139
- return (_jsx(AuthForgotPasswordForm, { onSubmit: (values) => requestPasswordReset({ email: values.email }) }));
200
+ return (_jsxs(_Fragment, { children: [_jsx(AuthForgotPasswordForm, { onSubmit: (values) => requestPasswordReset({ email: values.email }) }), _jsx(AuthSecondaryButton, { sx: { mt: 2 }, component: LinkComponent, to: "/sign-in", startIcon: _jsx(ArrowBackOutlinedIcon, { fontSize: "small" }), "aria-label": "Regresar a iniciar sesi\u00F3n", children: "Regresar a iniciar sesi\u00F3n" })] }));
140
201
  }
141
202
  function FuseResetPasswordPageForm(props) {
142
203
  const { initialUid = "", initialToken = "" } = props;
143
204
  const { confirmPasswordReset } = useFuseJwtAuth();
205
+ const navigate = useNavigate();
144
206
  return (_jsx(AuthPasswordResetConfirmForm, { defaultValues: {
145
207
  uid: initialUid,
146
208
  token: initialToken,
147
- }, onSubmit: (values) => confirmPasswordReset(values) }));
209
+ }, onGoToSignIn: () => navigate('/sign-in'), onSubmit: (values) => confirmPasswordReset(values) }));
148
210
  }
149
211
  function FuseAccountConfirmationPageForm(props) {
150
212
  const { initialUid = "", initialToken = "" } = props;
@@ -186,10 +248,10 @@ function useRoleSelectionDialog(options, defaultRole) {
186
248
  return { requestRoleSelection, dialog, hasRoleOptions: options.length > 0 };
187
249
  }
188
250
  export function createFuseAuthViews(options) {
189
- const { LinkComponent, accountConfirmationPath = "/verify-email", signUpRoleOptions, defaultSignUpRole, socialConfig, onSignUpSuccess, } = options;
251
+ const { LinkComponent, accountConfirmationPath = "/verify-email", signUpRoleOptions, defaultSignUpRole, socialConfig, showDebugSocial = false, onSignUpSuccess, } = options;
190
252
  function SignInPageView() {
191
253
  const [mode, setMode] = useState("password");
192
- const { signInSocial } = useFuseJwtAuth();
254
+ const { signInSocial, signInSocialPrecheck } = useFuseJwtAuth();
193
255
  const [socialLoadingProvider, setSocialLoadingProvider] = useState(null);
194
256
  const [socialError, setSocialError] = useState(null);
195
257
  const signupRoleOptions = (signUpRoleOptions ?? [])
@@ -199,7 +261,8 @@ export function createFuseAuthViews(options) {
199
261
  label: roleOption.label,
200
262
  }));
201
263
  const { requestRoleSelection, dialog, hasRoleOptions } = useRoleSelectionDialog(signupRoleOptions, defaultSignUpRole);
202
- const enabledSocialProviders = useMemo(() => getEnabledSocialProviders(socialConfig), [socialConfig]);
264
+ const enabledSocialProviders = useMemo(() => getEnabledSocialProviders(socialConfig, showDebugSocial), [socialConfig, showDebugSocial]);
265
+ const isAuthFlowBusy = socialLoadingProvider !== null;
203
266
  const onSocialClick = useCallback(async (provider) => {
204
267
  const providerConfig = enabledSocialProviders.find((item) => item.provider === provider);
205
268
  if (!providerConfig) {
@@ -208,27 +271,51 @@ export function createFuseAuthViews(options) {
208
271
  try {
209
272
  setSocialError(null);
210
273
  setSocialLoadingProvider(provider);
274
+ if (showDebugSocial) {
275
+ console.info("[jb-auth][social] start provider auth", { provider, providerConfig });
276
+ }
211
277
  const tokenPayload = await authenticateWithSocialProvider(provider, providerConfig);
212
- const selectedRole = hasRoleOptions ? await requestRoleSelection() : undefined;
213
- if (hasRoleOptions && !selectedRole) {
214
- return;
278
+ if (showDebugSocial) {
279
+ console.info("[jb-auth][social] provider token payload ready", { provider, tokenPayload });
215
280
  }
216
- await signInSocial({
281
+ const baseSocialPayload = {
217
282
  ...tokenPayload,
218
283
  provider,
219
- role: selectedRole,
220
284
  client: "web",
221
285
  termsAndConditionsAccepted: true,
286
+ };
287
+ if (showDebugSocial) {
288
+ console.info("[jb-auth][social] sending social precheck", { provider, client: "web" });
289
+ }
290
+ const socialPrecheckResponse = await signInSocialPrecheck(baseSocialPayload);
291
+ const shouldSelectRole = shouldSelectRoleForSocialLogin(socialPrecheckResponse, hasRoleOptions);
292
+ const selectedRole = shouldSelectRole ? await requestRoleSelection() : undefined;
293
+ if (shouldSelectRole && !selectedRole) {
294
+ return;
295
+ }
296
+ if (showDebugSocial) {
297
+ console.info("[jb-auth][social] sending loginSocial request", {
298
+ provider,
299
+ role: selectedRole,
300
+ client: "web"
301
+ });
302
+ }
303
+ await signInSocial({
304
+ ...baseSocialPayload,
305
+ role: selectedRole,
222
306
  });
223
307
  }
224
308
  catch (error) {
309
+ if (showDebugSocial) {
310
+ console.error("[jb-auth][social] flow failed", { provider, error });
311
+ }
225
312
  const parsed = parseAuthError(error);
226
- setSocialError(parsed.rootMessage || "No se pudo continuar con el proveedor social.");
313
+ setSocialError(parsed.rootMessage || "No se pudo acceder con el proveedor social.");
227
314
  }
228
315
  finally {
229
316
  setSocialLoadingProvider(null);
230
317
  }
231
- }, [enabledSocialProviders, hasRoleOptions, requestRoleSelection, signInSocial]);
318
+ }, [enabledSocialProviders, hasRoleOptions, requestRoleSelection, showDebugSocial, signInSocial, signInSocialPrecheck]);
232
319
  return (_jsxs(Box, { sx: {
233
320
  mx: { xs: "auto", sm: 0 },
234
321
  width: { xs: "100%", sm: 320 },
@@ -236,11 +323,11 @@ export function createFuseAuthViews(options) {
236
323
  display: "flex",
237
324
  flexDirection: "column",
238
325
  gap: 4,
239
- }, children: [_jsx(SignInPageTitle, {}), _jsxs(Box, { sx: { width: "100%" }, children: [_jsx(FuseSignInController, { LinkComponent: LinkComponent, mode: mode, requestRoleSelection: requestRoleSelection, onBackToPassword: () => setMode("password") }), mode === "password" && (_jsxs(_Fragment, { children: [_jsx(FuseSignUpCtaSection, { LinkComponent: LinkComponent }), _jsx(FuseAuthAlternativesSection, { onSmsClick: () => setMode("otp"), socialProviders: enabledSocialProviders, onSocialClick: onSocialClick, socialLoadingProvider: socialLoadingProvider, socialError: socialError })] }))] }), dialog] }));
326
+ }, children: [_jsx(AuthPageTitle, { title: "Iniciar sesi\u00F3n" }), _jsxs(Box, { sx: { width: "100%" }, children: [_jsx(FuseSignInController, { LinkComponent: LinkComponent, mode: mode, disabled: isAuthFlowBusy, requestRoleSelection: requestRoleSelection, onBackToPassword: () => setMode("password") }), mode === "password" && (_jsxs(_Fragment, { children: [_jsx(FuseSignUpCtaSection, { LinkComponent: LinkComponent, disabled: isAuthFlowBusy }), _jsx(FuseAuthAlternativesSection, { onSmsClick: () => setMode("otp"), socialProviders: enabledSocialProviders, onSocialClick: onSocialClick, socialLoadingProvider: socialLoadingProvider, socialError: socialError })] }))] }), dialog] }));
240
327
  }
241
328
  function SignUpPageView() {
242
329
  const [mode, setMode] = useState("password");
243
- const { signInSocial } = useFuseJwtAuth();
330
+ const { signInSocial, signInSocialPrecheck } = useFuseJwtAuth();
244
331
  const [socialLoadingProvider, setSocialLoadingProvider] = useState(null);
245
332
  const [socialError, setSocialError] = useState(null);
246
333
  const navigate = useNavigate();
@@ -251,7 +338,8 @@ export function createFuseAuthViews(options) {
251
338
  label: roleOption.label,
252
339
  }));
253
340
  const { requestRoleSelection, dialog, hasRoleOptions } = useRoleSelectionDialog(signupRoleOptions, defaultSignUpRole);
254
- const enabledSocialProviders = useMemo(() => getEnabledSocialProviders(socialConfig), [socialConfig]);
341
+ const enabledSocialProviders = useMemo(() => getEnabledSocialProviders(socialConfig, showDebugSocial), [socialConfig, showDebugSocial]);
342
+ const isAuthFlowBusy = socialLoadingProvider !== null;
255
343
  const onSocialClick = useCallback(async (provider) => {
256
344
  const providerConfig = enabledSocialProviders.find((item) => item.provider === provider);
257
345
  if (!providerConfig) {
@@ -260,27 +348,51 @@ export function createFuseAuthViews(options) {
260
348
  try {
261
349
  setSocialError(null);
262
350
  setSocialLoadingProvider(provider);
351
+ if (showDebugSocial) {
352
+ console.info("[jb-auth][social] start provider auth", { provider, providerConfig });
353
+ }
263
354
  const tokenPayload = await authenticateWithSocialProvider(provider, providerConfig);
264
- const selectedRole = hasRoleOptions ? await requestRoleSelection() : undefined;
265
- if (hasRoleOptions && !selectedRole) {
266
- return;
355
+ if (showDebugSocial) {
356
+ console.info("[jb-auth][social] provider token payload ready", { provider, tokenPayload });
267
357
  }
268
- await signInSocial({
358
+ const baseSocialPayload = {
269
359
  ...tokenPayload,
270
360
  provider,
271
- role: selectedRole,
272
361
  client: "web",
273
362
  termsAndConditionsAccepted: true,
363
+ };
364
+ if (showDebugSocial) {
365
+ console.info("[jb-auth][social] sending social precheck", { provider, client: "web" });
366
+ }
367
+ const socialPrecheckResponse = await signInSocialPrecheck(baseSocialPayload);
368
+ const shouldSelectRole = shouldSelectRoleForSocialLogin(socialPrecheckResponse, hasRoleOptions);
369
+ const selectedRole = shouldSelectRole ? await requestRoleSelection() : undefined;
370
+ if (shouldSelectRole && !selectedRole) {
371
+ return;
372
+ }
373
+ if (showDebugSocial) {
374
+ console.info("[jb-auth][social] sending loginSocial request", {
375
+ provider,
376
+ role: selectedRole,
377
+ client: "web"
378
+ });
379
+ }
380
+ await signInSocial({
381
+ ...baseSocialPayload,
382
+ role: selectedRole,
274
383
  });
275
384
  }
276
385
  catch (error) {
386
+ if (showDebugSocial) {
387
+ console.error("[jb-auth][social] flow failed", { provider, error });
388
+ }
277
389
  const parsed = parseAuthError(error);
278
- setSocialError(parsed.rootMessage || "No se pudo continuar con el proveedor social.");
390
+ setSocialError(parsed.rootMessage || "No se pudo acceder con el proveedor social.");
279
391
  }
280
392
  finally {
281
393
  setSocialLoadingProvider(null);
282
394
  }
283
- }, [enabledSocialProviders, hasRoleOptions, requestRoleSelection, signInSocial]);
395
+ }, [enabledSocialProviders, hasRoleOptions, requestRoleSelection, showDebugSocial, signInSocial, signInSocialPrecheck]);
284
396
  return (_jsxs(Box, { sx: {
285
397
  mx: { xs: "auto", sm: 0 },
286
398
  width: { xs: "100%", sm: 320 },
@@ -288,11 +400,11 @@ export function createFuseAuthViews(options) {
288
400
  display: "flex",
289
401
  flexDirection: "column",
290
402
  gap: 4,
291
- }, children: [_jsx(SignUpPageTitle, {}), _jsx(Box, { sx: { width: "100%" }, children: mode === "password" ? (_jsxs(_Fragment, { children: [_jsx(FuseSignUpController, { requiresRoleSelection: hasRoleOptions, requestRoleSelection: requestRoleSelection, onSuccess: (payload) => {
403
+ }, children: [_jsx(AuthPageTitle, { title: "Crear cuenta" }), _jsx(Box, { sx: { width: "100%" }, children: mode === "password" ? (_jsxs(_Fragment, { children: [_jsx(FuseSignUpController, { disabled: isAuthFlowBusy, requiresRoleSelection: hasRoleOptions, requestRoleSelection: requestRoleSelection, onSuccess: (payload) => {
292
404
  const { email } = payload;
293
405
  onSignUpSuccess?.(payload);
294
406
  navigate(`${accountConfirmationPath}?email=${encodeURIComponent(email)}`);
295
- } }), _jsx(FuseSignInCtaSection, { LinkComponent: LinkComponent }), _jsx(FuseAuthAlternativesSection, { onSmsClick: () => setMode("otp"), socialProviders: enabledSocialProviders, onSocialClick: onSocialClick, socialLoadingProvider: socialLoadingProvider, socialError: socialError })] })) : (_jsx(FuseOtpSignUpForm, { requestRoleSelection: requestRoleSelection, onBackToPassword: () => setMode("password") })) }), dialog] }));
407
+ } }), _jsx(FuseSignInCtaSection, { LinkComponent: LinkComponent, disabled: isAuthFlowBusy }), _jsx(FuseAuthAlternativesSection, { onSmsClick: () => setMode("otp"), socialProviders: enabledSocialProviders, onSocialClick: onSocialClick, socialLoadingProvider: socialLoadingProvider, socialError: socialError })] })) : (_jsx(FuseOtpSignUpForm, { requestRoleSelection: requestRoleSelection, onBackToPassword: () => setMode("password") })) }), dialog] }));
296
408
  }
297
409
  function ForgotPasswordPageView() {
298
410
  return (_jsxs(Box, { sx: {
@@ -302,13 +414,7 @@ export function createFuseAuthViews(options) {
302
414
  display: "flex",
303
415
  flexDirection: "column",
304
416
  gap: 4,
305
- }, children: [_jsxs(Box, { sx: { width: "100%" }, children: [_jsx("img", { style: { width: 48 }, src: "/assets/images/logo/logo.svg", alt: "logo" }), _jsx(Typography, { sx: {
306
- mt: 4,
307
- fontSize: 36,
308
- lineHeight: 1.25,
309
- fontWeight: 800,
310
- letterSpacing: "-0.02em",
311
- }, children: "Olvid\u00E9 mi contrase\u00F1a" }), _jsx(Typography, { sx: { mt: 1.5, fontSize: 16 }, color: "text.secondary", children: "Ingresa tu correo y te enviaremos un enlace para restablecer tu contrase\u00F1a." })] }), _jsx(FuseForgotPasswordPageForm, {}), _jsxs(Typography, { sx: { fontSize: 16, fontWeight: 500 }, color: "text.secondary", children: ["Volver a ", _jsx(LinkComponent, { to: "/sign-in", children: "Iniciar sesi\u00F3n" })] })] }));
417
+ }, children: [_jsxs(Box, { sx: { width: "100%" }, children: [_jsx(AuthPageTitle, { title: "Olvid\u00E9 mi contrase\u00F1a" }), _jsx(Typography, { sx: { mt: 1.5, fontSize: 16, textAlign: "center" }, color: "text.secondary", children: "Ingresa tu correo y te enviaremos un enlace para restablecer tu contrase\u00F1a." })] }), _jsx(FuseForgotPasswordPageForm, { LinkComponent: LinkComponent })] }));
312
418
  }
313
419
  function ResetPasswordPageView() {
314
420
  const [searchParams] = useSearchParams();
@@ -321,20 +427,14 @@ export function createFuseAuthViews(options) {
321
427
  display: "flex",
322
428
  flexDirection: "column",
323
429
  gap: 4,
324
- }, children: [_jsxs(Box, { sx: { width: "100%" }, children: [_jsx("img", { style: { width: 48 }, src: "/assets/images/logo/logo.svg", alt: "logo" }), _jsx(Typography, { sx: {
325
- mt: 4,
326
- fontSize: 36,
327
- lineHeight: 1.25,
328
- fontWeight: 800,
329
- letterSpacing: "-0.02em",
330
- }, children: "Restablecer contrase\u00F1a" }), _jsx(Typography, { sx: { mt: 1.5, fontSize: 16 }, color: "text.secondary", children: "Define una nueva contrase\u00F1a para volver a acceder a tu cuenta." })] }), _jsx(FuseResetPasswordPageForm, { initialUid: initialUid, initialToken: initialToken }), _jsxs(Typography, { sx: { fontSize: 16, fontWeight: 500 }, color: "text.secondary", children: ["Volver a ", _jsx(LinkComponent, { to: "/sign-in", children: "Iniciar sesi\u00F3n" })] })] }));
430
+ }, children: [_jsxs(Box, { sx: { width: "100%" }, children: [_jsx(AuthPageTitle, { title: "Restablecer contrase\u00F1a" }), _jsx(Typography, { sx: { mt: 1.5, fontSize: 16 }, color: "text.secondary", children: "Define una nueva contrase\u00F1a para volver a acceder a tu cuenta." })] }), _jsx(FuseResetPasswordPageForm, { initialUid: initialUid, initialToken: initialToken })] }));
331
431
  }
332
432
  function SignOutPageView() {
333
433
  return (_jsxs(Box, { sx: {
334
434
  mx: { xs: "auto", sm: 0 },
335
435
  width: { xs: "100%", sm: 320 },
336
436
  maxWidth: 320,
337
- }, children: [_jsx(SignOutPageTitle, {}), _jsxs(Typography, { sx: { mt: 2, textAlign: "center", fontSize: 16, fontWeight: 500 }, color: "text.secondary", children: ["Ir a ", _jsx(LinkComponent, { to: "/sign-in", children: "iniciar sesi\u00F3n" })] })] }));
437
+ }, children: [_jsx(AuthPageTitle, { title: "Has cerrado sesi\u00F3n" }), _jsxs(Typography, { sx: { mt: 2, textAlign: "center", fontSize: 16, fontWeight: 500 }, color: "text.secondary", children: ["Ir a ", _jsx(LinkComponent, { to: "/sign-in", children: "iniciar sesi\u00F3n" })] })] }));
338
438
  }
339
439
  function AccountConfirmationPageView() {
340
440
  const [searchParams] = useSearchParams();
@@ -347,13 +447,7 @@ export function createFuseAuthViews(options) {
347
447
  display: "flex",
348
448
  flexDirection: "column",
349
449
  gap: 4,
350
- }, children: [_jsxs(Box, { sx: { width: "100%" }, children: [_jsx("img", { style: { width: 48 }, src: "/assets/images/logo/logo.svg", alt: "logo" }), _jsx(Typography, { sx: {
351
- mt: 4,
352
- fontSize: 36,
353
- lineHeight: 1.25,
354
- fontWeight: 800,
355
- letterSpacing: "-0.02em",
356
- }, children: "Verificar cuenta" }), _jsx(Typography, { sx: { mt: 1.5, fontSize: 16 }, color: "text.secondary", children: "Estamos validando tu enlace de confirmaci\u00F3n." })] }), _jsx(FuseAccountConfirmationPageForm, { initialUid: initialUid, initialToken: initialToken })] }));
450
+ }, children: [_jsxs(Box, { sx: { width: "100%" }, children: [_jsx(AuthPageTitle, { title: "Verificar cuenta" }), _jsx(Typography, { sx: { mt: 1.5, fontSize: 16 }, color: "text.secondary", children: "Estamos validando tu enlace de confirmaci\u00F3n." })] }), _jsx(FuseAccountConfirmationPageForm, { initialUid: initialUid, initialToken: initialToken })] }));
357
451
  }
358
452
  return {
359
453
  SignInPageView,
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { AuthClient } from '../client';
3
- import { AccountConfirmationPayload, AccountConfirmationResendPayload, LoginSocialPayload, PasswordChangePayload, PasswordResetConfirmPayload, PasswordResetRequestPayload, RegisterPayload, RequestOtpPayload, VerifyOtpPayload } from '../types';
3
+ import { AccountConfirmationPayload, AccountConfirmationResendPayload, LoginSocialPrecheckResponse, LoginSocialPayload, PasswordChangePayload, PasswordResetConfirmPayload, PasswordResetRequestPayload, RegisterPayload, RequestOtpPayload, VerifyOtpPayload } from '../types';
4
4
  type JsonRecord = Record<string, unknown>;
5
5
  type FuseAuthState<TUser = JsonRecord> = {
6
6
  authStatus: 'configuring' | 'authenticated' | 'unauthenticated';
@@ -14,6 +14,7 @@ export type FuseJwtAuthContextType<TUser = JsonRecord> = FuseAuthState<TUser> &
14
14
  username?: string;
15
15
  }) => Promise<JsonRecord>;
16
16
  signInSocial: (payload: LoginSocialPayload) => Promise<JsonRecord>;
17
+ signInSocialPrecheck: (payload: LoginSocialPayload) => Promise<LoginSocialPrecheckResponse>;
17
18
  requestOtp: (payload: RequestOtpPayload) => Promise<Record<string, unknown>>;
18
19
  signInOtp: (payload: VerifyOtpPayload) => Promise<JsonRecord>;
19
20
  signUp: (payload: RegisterPayload) => Promise<JsonRecord>;
@@ -1 +1 @@
1
- {"version":3,"file":"fuseAdapter.d.ts","sourceRoot":"","sources":["../../../src/auth/fuse/fuseAdapter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAOV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC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F,yBAAyB,EAAE,CAAC,OAAO,EAAE,gCAAgC,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3G,oBAAoB,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjG,oBAAoB,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjG,cAAc,EAAE,CAAC,OAAO,EAAE,qBAAqB,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACrF,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAC1D,WAAW,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IACtD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC5C,CAAC;AAEF,KAAK,8BAA8B,GAAG;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACpD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,CAAC,CAAC;CACJ,CAAC;AAsEF,eAAO,MAAM,yBAAyB,GAAI,YAAY,UAAU,aAC1B,8BAA8B,4CA2QnE,CAAC;AAEF,eAAO,MAAM,cAAc,0CAM1B,CAAC"}
@@ -164,6 +164,10 @@ export const createFuseJwtAuthProvider = (authClient) => {
164
164
  refresh_token: session.refreshToken
165
165
  };
166
166
  }, []);
167
+ const signInSocialPrecheck = useCallback(async (payload) => authClient.loginSocialPrecheck({
168
+ ...payload,
169
+ client: payload.client ?? 'web'
170
+ }), []);
167
171
  const signInOtp = useCallback(async (payload) => {
168
172
  const session = normalizeSession(await authClient.verifyOtp({
169
173
  ...payload,
@@ -220,6 +224,7 @@ export const createFuseJwtAuthProvider = (authClient) => {
220
224
  ...authState,
221
225
  signIn,
222
226
  signInSocial,
227
+ signInSocialPrecheck,
223
228
  requestOtp,
224
229
  signInOtp,
225
230
  signUp,
@@ -236,6 +241,7 @@ export const createFuseJwtAuthProvider = (authClient) => {
236
241
  authState,
237
242
  signIn,
238
243
  signInSocial,
244
+ signInSocialPrecheck,
239
245
  requestOtp,
240
246
  signInOtp,
241
247
  signUp,
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/auth/routes.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EACL,WAAW,EACX,uBAAuB,EAIxB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,MAAM,CAAC;AAEzF,KAAK,YAAY,GACb,QAAQ,GACR,QAAQ,GACR,gBAAgB,GAChB,eAAe,GACf,SAAS,GACT,qBAAqB,CAAC;AAE1B,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC3F,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,YAAY,CAAC;CACvB,GAAG,KAAK,CAAC;AAEV,MAA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