strapi-plugin-firebase-authentication 1.1.11 → 1.2.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.
Files changed (33) hide show
  1. package/dist/_chunks/{App-DZQe17x8.js → App-B7d4qS3T.js} +203 -141
  2. package/dist/_chunks/{App-BY1gNGKH.mjs → App-CQ9ehArz.mjs} +112 -29
  3. package/dist/_chunks/{api-D_4cdJU5.mjs → api-BM2UtpvM.mjs} +1 -1
  4. package/dist/_chunks/{api-DR4wmAFN.js → api-DYP-1kdx.js} +1 -1
  5. package/dist/_chunks/{index-D8pv1Q6h.mjs → index-0tTyhxbb.mjs} +148 -34
  6. package/dist/_chunks/{index-BnT1fFPr.js → index-B5EwGI_y.js} +2 -2
  7. package/dist/_chunks/{index-DtGfwf9S.mjs → index-CMFutRyI.mjs} +2 -2
  8. package/dist/_chunks/{index-dVTLVmwU.js → index-Cwp9xkG4.js} +148 -34
  9. package/dist/admin/index.js +1 -1
  10. package/dist/admin/index.mjs +1 -1
  11. package/dist/admin/src/components/user-management/ResendVerification/ResendVerification.d.ts +9 -0
  12. package/dist/admin/src/components/user-management/index.d.ts +1 -0
  13. package/dist/admin/src/pages/Settings/api.d.ts +4 -0
  14. package/dist/admin/src/pages/utils/api.d.ts +2 -1
  15. package/dist/server/index.js +6447 -2301
  16. package/dist/server/index.mjs +6444 -2298
  17. package/dist/server/src/config/index.d.ts +1 -1
  18. package/dist/server/src/content-types/index.d.ts +23 -0
  19. package/dist/server/src/controllers/firebaseController.d.ts +24 -0
  20. package/dist/server/src/controllers/index.d.ts +4 -0
  21. package/dist/server/src/controllers/userController.d.ts +1 -0
  22. package/dist/server/src/index.d.ts +65 -2
  23. package/dist/server/src/services/emailService.d.ts +19 -0
  24. package/dist/server/src/services/firebaseService.d.ts +19 -2
  25. package/dist/server/src/services/index.d.ts +37 -1
  26. package/dist/server/src/services/settingsService.d.ts +2 -0
  27. package/dist/server/src/services/tokenService.d.ts +49 -0
  28. package/dist/server/src/services/userService.d.ts +27 -1
  29. package/dist/server/src/templates/defaults/email-verification.d.ts +2 -0
  30. package/dist/server/src/templates/defaults/index.d.ts +2 -0
  31. package/dist/server/src/templates/defaults/password-changed.d.ts +2 -0
  32. package/dist/server/src/templates/types.d.ts +6 -2
  33. package/package.json +1 -1
@@ -7,13 +7,13 @@ const reactTooltip = require("@radix-ui/react-tooltip");
7
7
  const React = require("react");
8
8
  const designSystem = require("@strapi/design-system");
9
9
  const reactIntl = require("react-intl");
10
- const index = require("./index-BnT1fFPr.js");
10
+ const index = require("./index-B5EwGI_y.js");
11
11
  const icons = require("@strapi/icons");
12
12
  const styled = require("styled-components");
13
13
  const rx = require("react-icons/rx");
14
14
  const ai = require("react-icons/ai");
15
15
  const md = require("react-icons/md");
16
- const api = require("./api-DR4wmAFN.js");
16
+ const api = require("./api-DYP-1kdx.js");
17
17
  const PhoneInputModule = require("react-phone-input-2");
18
18
  require("react-phone-input-2/lib/style.css");
19
19
  const validator = require("validator");
@@ -2731,6 +2731,12 @@ const getFirebaseConfig = async () => {
2731
2731
  };
2732
2732
  }
2733
2733
  };
2734
+ const sendVerificationEmail = async (userId) => {
2735
+ const url = `/${index.PLUGIN_ID}/users/sendVerificationEmail/${userId}`;
2736
+ const { put } = admin.getFetchClient();
2737
+ const { data: result } = await put(url, {});
2738
+ return result;
2739
+ };
2734
2740
  const PaginationFooter = ({ pageCount = 0 }) => {
2735
2741
  const [{ query }, setQuery] = admin.useQueryParams();
2736
2742
  const pageSize = query?.pageSize || "10";
@@ -2999,7 +3005,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
2999
3005
  var ys = arrObjKeys(obj, inspect2);
3000
3006
  var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
3001
3007
  var protoTag = obj instanceof Object ? "" : "null prototype";
3002
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
3008
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
3003
3009
  var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
3004
3010
  var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
3005
3011
  if (ys.length === 0) {
@@ -3024,25 +3030,25 @@ function canTrustToString(obj) {
3024
3030
  return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
3025
3031
  }
3026
3032
  function isArray$3(obj) {
3027
- return toStr(obj) === "[object Array]" && canTrustToString(obj);
3033
+ return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
3028
3034
  }
3029
3035
  function isDate(obj) {
3030
- return toStr(obj) === "[object Date]" && canTrustToString(obj);
3036
+ return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
3031
3037
  }
3032
3038
  function isRegExp$1(obj) {
3033
- return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
3039
+ return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
3034
3040
  }
3035
3041
  function isError(obj) {
3036
- return toStr(obj) === "[object Error]" && canTrustToString(obj);
3042
+ return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
3037
3043
  }
3038
3044
  function isString(obj) {
3039
- return toStr(obj) === "[object String]" && canTrustToString(obj);
3045
+ return toStr$1(obj) === "[object String]" && canTrustToString(obj);
3040
3046
  }
3041
3047
  function isNumber(obj) {
3042
- return toStr(obj) === "[object Number]" && canTrustToString(obj);
3048
+ return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
3043
3049
  }
3044
3050
  function isBoolean(obj) {
3045
- return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
3051
+ return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
3046
3052
  }
3047
3053
  function isSymbol(obj) {
3048
3054
  if (hasShammedSymbols) {
@@ -3078,7 +3084,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
3078
3084
  function has$3(obj, key) {
3079
3085
  return hasOwn$1.call(obj, key);
3080
3086
  }
3081
- function toStr(obj) {
3087
+ function toStr$1(obj) {
3082
3088
  return objectToString.call(obj);
3083
3089
  }
3084
3090
  function nameOf(f) {
@@ -3387,7 +3393,7 @@ var syntax = SyntaxError;
3387
3393
  var uri = URIError;
3388
3394
  var abs$1 = Math.abs;
3389
3395
  var floor$1 = Math.floor;
3390
- var max$1 = Math.max;
3396
+ var max$2 = Math.max;
3391
3397
  var min$1 = Math.min;
3392
3398
  var pow$1 = Math.pow;
3393
3399
  var round$1 = Math.round;
@@ -3516,99 +3522,78 @@ function requireObject_getPrototypeOf() {
3516
3522
  Object_getPrototypeOf = $Object2.getPrototypeOf || null;
3517
3523
  return Object_getPrototypeOf;
3518
3524
  }
3519
- var implementation;
3520
- var hasRequiredImplementation;
3521
- function requireImplementation() {
3522
- if (hasRequiredImplementation) return implementation;
3523
- hasRequiredImplementation = 1;
3524
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
3525
- var toStr2 = Object.prototype.toString;
3526
- var max2 = Math.max;
3527
- var funcType = "[object Function]";
3528
- var concatty = function concatty2(a3, b2) {
3529
- var arr = [];
3530
- for (var i2 = 0; i2 < a3.length; i2 += 1) {
3531
- arr[i2] = a3[i2];
3532
- }
3533
- for (var j = 0; j < b2.length; j += 1) {
3534
- arr[j + a3.length] = b2[j];
3535
- }
3536
- return arr;
3537
- };
3538
- var slicy = function slicy2(arrLike, offset) {
3539
- var arr = [];
3540
- for (var i2 = offset, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
3541
- arr[j] = arrLike[i2];
3542
- }
3543
- return arr;
3544
- };
3545
- var joiny = function(arr, joiner) {
3546
- var str = "";
3547
- for (var i2 = 0; i2 < arr.length; i2 += 1) {
3548
- str += arr[i2];
3549
- if (i2 + 1 < arr.length) {
3550
- str += joiner;
3551
- }
3525
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
3526
+ var toStr = Object.prototype.toString;
3527
+ var max$1 = Math.max;
3528
+ var funcType = "[object Function]";
3529
+ var concatty = function concatty2(a3, b2) {
3530
+ var arr = [];
3531
+ for (var i2 = 0; i2 < a3.length; i2 += 1) {
3532
+ arr[i2] = a3[i2];
3533
+ }
3534
+ for (var j = 0; j < b2.length; j += 1) {
3535
+ arr[j + a3.length] = b2[j];
3536
+ }
3537
+ return arr;
3538
+ };
3539
+ var slicy = function slicy2(arrLike, offset) {
3540
+ var arr = [];
3541
+ for (var i2 = offset, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
3542
+ arr[j] = arrLike[i2];
3543
+ }
3544
+ return arr;
3545
+ };
3546
+ var joiny = function(arr, joiner) {
3547
+ var str = "";
3548
+ for (var i2 = 0; i2 < arr.length; i2 += 1) {
3549
+ str += arr[i2];
3550
+ if (i2 + 1 < arr.length) {
3551
+ str += joiner;
3552
3552
  }
3553
- return str;
3554
- };
3555
- implementation = function bind2(that) {
3556
- var target = this;
3557
- if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
3558
- throw new TypeError(ERROR_MESSAGE + target);
3559
- }
3560
- var args = slicy(arguments, 1);
3561
- var bound;
3562
- var binder = function() {
3563
- if (this instanceof bound) {
3564
- var result = target.apply(
3565
- this,
3566
- concatty(args, arguments)
3567
- );
3568
- if (Object(result) === result) {
3569
- return result;
3570
- }
3571
- return this;
3572
- }
3573
- return target.apply(
3574
- that,
3553
+ }
3554
+ return str;
3555
+ };
3556
+ var implementation$1 = function bind(that) {
3557
+ var target = this;
3558
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
3559
+ throw new TypeError(ERROR_MESSAGE + target);
3560
+ }
3561
+ var args = slicy(arguments, 1);
3562
+ var bound;
3563
+ var binder = function() {
3564
+ if (this instanceof bound) {
3565
+ var result = target.apply(
3566
+ this,
3575
3567
  concatty(args, arguments)
3576
3568
  );
3577
- };
3578
- var boundLength = max2(0, target.length - args.length);
3579
- var boundArgs = [];
3580
- for (var i2 = 0; i2 < boundLength; i2++) {
3581
- boundArgs[i2] = "$" + i2;
3582
- }
3583
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
3584
- if (target.prototype) {
3585
- var Empty = function Empty2() {
3586
- };
3587
- Empty.prototype = target.prototype;
3588
- bound.prototype = new Empty();
3589
- Empty.prototype = null;
3569
+ if (Object(result) === result) {
3570
+ return result;
3571
+ }
3572
+ return this;
3590
3573
  }
3591
- return bound;
3574
+ return target.apply(
3575
+ that,
3576
+ concatty(args, arguments)
3577
+ );
3592
3578
  };
3593
- return implementation;
3594
- }
3595
- var functionBind;
3596
- var hasRequiredFunctionBind;
3597
- function requireFunctionBind() {
3598
- if (hasRequiredFunctionBind) return functionBind;
3599
- hasRequiredFunctionBind = 1;
3600
- var implementation2 = requireImplementation();
3601
- functionBind = Function.prototype.bind || implementation2;
3602
- return functionBind;
3603
- }
3604
- var functionCall;
3605
- var hasRequiredFunctionCall;
3606
- function requireFunctionCall() {
3607
- if (hasRequiredFunctionCall) return functionCall;
3608
- hasRequiredFunctionCall = 1;
3609
- functionCall = Function.prototype.call;
3610
- return functionCall;
3611
- }
3579
+ var boundLength = max$1(0, target.length - args.length);
3580
+ var boundArgs = [];
3581
+ for (var i2 = 0; i2 < boundLength; i2++) {
3582
+ boundArgs[i2] = "$" + i2;
3583
+ }
3584
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
3585
+ if (target.prototype) {
3586
+ var Empty = function Empty2() {
3587
+ };
3588
+ Empty.prototype = target.prototype;
3589
+ bound.prototype = new Empty();
3590
+ Empty.prototype = null;
3591
+ }
3592
+ return bound;
3593
+ };
3594
+ var implementation = implementation$1;
3595
+ var functionBind = Function.prototype.bind || implementation;
3596
+ var functionCall = Function.prototype.call;
3612
3597
  var functionApply;
3613
3598
  var hasRequiredFunctionApply;
3614
3599
  function requireFunctionApply() {
@@ -3618,14 +3603,14 @@ function requireFunctionApply() {
3618
3603
  return functionApply;
3619
3604
  }
3620
3605
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
3621
- var bind$2 = requireFunctionBind();
3606
+ var bind$2 = functionBind;
3622
3607
  var $apply$1 = requireFunctionApply();
3623
- var $call$2 = requireFunctionCall();
3608
+ var $call$2 = functionCall;
3624
3609
  var $reflectApply = reflectApply;
3625
3610
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
3626
- var bind$1 = requireFunctionBind();
3611
+ var bind$1 = functionBind;
3627
3612
  var $TypeError$4 = type;
3628
- var $call$1 = requireFunctionCall();
3613
+ var $call$1 = functionCall;
3629
3614
  var $actualApply = actualApply;
3630
3615
  var callBindApplyHelpers = function callBindBasic(args) {
3631
3616
  if (args.length < 1 || typeof args[0] !== "function") {
@@ -3691,8 +3676,8 @@ function requireHasown() {
3691
3676
  hasRequiredHasown = 1;
3692
3677
  var call = Function.prototype.call;
3693
3678
  var $hasOwn = Object.prototype.hasOwnProperty;
3694
- var bind2 = requireFunctionBind();
3695
- hasown = bind2.call(call, $hasOwn);
3679
+ var bind3 = functionBind;
3680
+ hasown = bind3.call(call, $hasOwn);
3696
3681
  return hasown;
3697
3682
  }
3698
3683
  var undefined$1;
@@ -3706,7 +3691,7 @@ var $TypeError$3 = type;
3706
3691
  var $URIError = uri;
3707
3692
  var abs = abs$1;
3708
3693
  var floor = floor$1;
3709
- var max = max$1;
3694
+ var max = max$2;
3710
3695
  var min = min$1;
3711
3696
  var pow = pow$1;
3712
3697
  var round = round$1;
@@ -3740,7 +3725,7 @@ var getProto = requireGetProto();
3740
3725
  var $ObjectGPO = requireObject_getPrototypeOf();
3741
3726
  var $ReflectGPO = requireReflect_getPrototypeOf();
3742
3727
  var $apply = requireFunctionApply();
3743
- var $call = requireFunctionCall();
3728
+ var $call = functionCall;
3744
3729
  var needsEval = {};
3745
3730
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
3746
3731
  var INTRINSICS = {
@@ -3911,13 +3896,13 @@ var LEGACY_ALIASES = {
3911
3896
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
3912
3897
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
3913
3898
  };
3914
- var bind = requireFunctionBind();
3899
+ var bind2 = functionBind;
3915
3900
  var hasOwn = requireHasown();
3916
- var $concat = bind.call($call, Array.prototype.concat);
3917
- var $spliceApply = bind.call($apply, Array.prototype.splice);
3918
- var $replace = bind.call($call, String.prototype.replace);
3919
- var $strSlice = bind.call($call, String.prototype.slice);
3920
- var $exec = bind.call($call, RegExp.prototype.exec);
3901
+ var $concat = bind2.call($call, Array.prototype.concat);
3902
+ var $spliceApply = bind2.call($apply, Array.prototype.splice);
3903
+ var $replace = bind2.call($call, String.prototype.replace);
3904
+ var $strSlice = bind2.call($call, String.prototype.slice);
3905
+ var $exec = bind2.call($call, RegExp.prototype.exec);
3921
3906
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
3922
3907
  var reEscapeChar = /\\(\\)?/g;
3923
3908
  var stringToPath = function stringToPath2(string) {
@@ -5058,6 +5043,59 @@ const ResetPassword = ({
5058
5043
  ] })
5059
5044
  ] }) });
5060
5045
  };
5046
+ const ResendVerification = ({
5047
+ isOpen,
5048
+ email,
5049
+ userId,
5050
+ onClose,
5051
+ onSendVerificationEmail
5052
+ }) => {
5053
+ const [isLoading, setIsLoading] = React.useState(false);
5054
+ const [emailSent, setEmailSent] = React.useState(false);
5055
+ const [error, setError] = React.useState("");
5056
+ const resetState = () => {
5057
+ setEmailSent(false);
5058
+ setError("");
5059
+ setIsLoading(false);
5060
+ };
5061
+ const handleClose = () => {
5062
+ resetState();
5063
+ onClose();
5064
+ };
5065
+ const handleSendEmail = async () => {
5066
+ try {
5067
+ setIsLoading(true);
5068
+ setError("");
5069
+ await onSendVerificationEmail();
5070
+ setEmailSent(true);
5071
+ } catch (err) {
5072
+ setError(err.message || "Failed to send verification email");
5073
+ } finally {
5074
+ setIsLoading(false);
5075
+ }
5076
+ };
5077
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
5078
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: "Resend Verification Email" }),
5079
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 4, alignItems: "center", children: [
5080
+ !emailSent ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5081
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { textAlign: "center", children: [
5082
+ "Send a verification email to ",
5083
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: email }),
5084
+ "?"
5085
+ ] }),
5086
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", textColor: "neutral600", textAlign: "center", children: "The link will expire in 1 hour." })
5087
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Alert, { variant: "success", title: "Email Sent", children: [
5088
+ "Verification email has been sent to ",
5089
+ email
5090
+ ] }),
5091
+ error && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Alert, { variant: "danger", title: "Error", children: error })
5092
+ ] }) }),
5093
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Footer, { children: [
5094
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleClose, variant: "tertiary", children: emailSent ? "Close" : "Cancel" }),
5095
+ !emailSent && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "success", loading: isLoading, onClick: handleSendEmail, children: "Send" })
5096
+ ] })
5097
+ ] }) });
5098
+ };
5061
5099
  const HEADER_TITLE = "Firebase Users";
5062
5100
  const NOTIFICATION_MESSAGES = {
5063
5101
  DELETED: "Deleted",
@@ -5418,24 +5456,10 @@ const HomePage = () => {
5418
5456
  let PhoneInputTemp = PhoneInputModule__namespace;
5419
5457
  let unwrapCount = 0;
5420
5458
  while (PhoneInputTemp && typeof PhoneInputTemp === "object" && PhoneInputTemp.default && unwrapCount < 5) {
5421
- console.log(`🔧 Unwrapping PhoneInput layer ${unwrapCount}:`, PhoneInputTemp);
5422
5459
  PhoneInputTemp = PhoneInputTemp.default;
5423
5460
  unwrapCount++;
5424
5461
  }
5425
5462
  const PhoneInput = PhoneInputTemp;
5426
- console.log("🔍 ==================== PhoneInput Final Check ====================");
5427
- console.log(" Unwrap iterations:", unwrapCount);
5428
- console.log(" PhoneInput FINAL:", PhoneInput);
5429
- console.log(" PhoneInput type:", typeof PhoneInput);
5430
- console.log(" PhoneInput $$typeof:", PhoneInput?.$$typeof);
5431
- console.log(" PhoneInput name:", PhoneInput?.name);
5432
- console.log(" PhoneInput displayName:", PhoneInput?.displayName);
5433
- console.log(" Is function?:", typeof PhoneInput === "function");
5434
- console.log(
5435
- " Is valid React component?:",
5436
- typeof PhoneInput === "function" || PhoneInput && PhoneInput.$$typeof
5437
- );
5438
- console.log("🔍 ================================================================");
5439
5463
  const StyledPhoneInputWrapper = styled__default.default.div`
5440
5464
  width: 100%;
5441
5465
 
@@ -5959,6 +5983,11 @@ const EditUserForm = ({ data }) => {
5959
5983
  email: "",
5960
5984
  id: ""
5961
5985
  });
5986
+ const [showVerificationDialog, setShowVerificationDialog] = React.useState({
5987
+ isOpen: false,
5988
+ email: "",
5989
+ id: ""
5990
+ });
5962
5991
  const [passwordConfig, setPasswordConfig] = React.useState({
5963
5992
  passwordRequirementsRegex: "^.{6,}$",
5964
5993
  passwordRequirementsMessage: "Password must be at least 6 characters long"
@@ -6046,6 +6075,12 @@ const EditUserForm = ({ data }) => {
6046
6075
  });
6047
6076
  }
6048
6077
  }, [userData.uid, toggleNotification]);
6078
+ const handleCloseVerificationDialog = React.useCallback(() => {
6079
+ setShowVerificationDialog({ isOpen: false, email: "", id: "" });
6080
+ }, []);
6081
+ const handleSendVerificationEmail = React.useCallback(async () => {
6082
+ await sendVerificationEmail(userData.uid);
6083
+ }, [userData.uid]);
6049
6084
  if (isLoading) {
6050
6085
  return /* @__PURE__ */ jsxRuntime.jsx(admin.Page.Loading, {});
6051
6086
  }
@@ -6149,20 +6184,37 @@ const EditUserForm = ({ data }) => {
6149
6184
  shadow: "tableShadow",
6150
6185
  children: [
6151
6186
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", textColor: "neutral600", marginBottom: 2, children: "Account Actions" }),
6152
- /* @__PURE__ */ jsxRuntime.jsx(
6153
- PasswordResetButton,
6154
- {
6155
- user: userData,
6156
- fullWidth: true,
6157
- onClick: () => {
6158
- setShowResetPasswordDialog({
6159
- isOpen: true,
6160
- email: userData.email || "",
6161
- id: userData.uid || ""
6162
- });
6187
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
6188
+ /* @__PURE__ */ jsxRuntime.jsx(
6189
+ PasswordResetButton,
6190
+ {
6191
+ user: userData,
6192
+ fullWidth: true,
6193
+ onClick: () => {
6194
+ setShowResetPasswordDialog({
6195
+ isOpen: true,
6196
+ email: userData.email || "",
6197
+ id: userData.uid || ""
6198
+ });
6199
+ }
6163
6200
  }
6164
- }
6165
- )
6201
+ ),
6202
+ userData.email && !userData.emailVerified && /* @__PURE__ */ jsxRuntime.jsx(
6203
+ designSystem.Button,
6204
+ {
6205
+ variant: "secondary",
6206
+ fullWidth: true,
6207
+ onClick: () => {
6208
+ setShowVerificationDialog({
6209
+ isOpen: true,
6210
+ email: userData.email || "",
6211
+ id: userData.uid || ""
6212
+ });
6213
+ },
6214
+ children: "Resend Verification Email"
6215
+ }
6216
+ )
6217
+ ] })
6166
6218
  ]
6167
6219
  }
6168
6220
  ),
@@ -6227,6 +6279,16 @@ const EditUserForm = ({ data }) => {
6227
6279
  passwordMessage: passwordConfig.passwordRequirementsMessage,
6228
6280
  onSendResetEmail: handleSendResetEmail
6229
6281
  }
6282
+ ),
6283
+ /* @__PURE__ */ jsxRuntime.jsx(
6284
+ ResendVerification,
6285
+ {
6286
+ isOpen: showVerificationDialog.isOpen,
6287
+ onClose: handleCloseVerificationDialog,
6288
+ email: showVerificationDialog.email,
6289
+ userId: showVerificationDialog.id,
6290
+ onSendVerificationEmail: handleSendVerificationEmail
6291
+ }
6230
6292
  )
6231
6293
  ] });
6232
6294
  };