@workos-inc/widgets 1.20.2-next.1792437930696 → 1.20.2-next.1792439904014

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 (28) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/dist/cjs/lib/elevated-access.cjs +9 -4
  3. package/dist/cjs/lib/elevated-access.cjs.map +1 -1
  4. package/dist/cjs/widgets/pipes/pipes.cjs +1 -0
  5. package/dist/cjs/widgets/pipes/pipes.cjs.map +1 -1
  6. package/dist/cjs/widgets/pipes/pipes.d.cts +10 -1
  7. package/dist/cjs/widgets/pipes/pipes.d.cts.map +1 -1
  8. package/dist/cjs/widgets/pipes-admin/pipes-admin.cjs +2 -7
  9. package/dist/cjs/widgets/pipes-admin/pipes-admin.cjs.map +1 -1
  10. package/dist/cjs/widgets/pipes-admin/pipes-admin.d.cts.map +1 -1
  11. package/dist/cjs/widgets/user-security/add-mfa-dialog.cjs +3 -3
  12. package/dist/cjs/widgets/user-security/add-mfa-dialog.cjs.map +1 -1
  13. package/dist/esm/lib/elevated-access.js +18 -13
  14. package/dist/esm/lib/elevated-access.js.map +1 -1
  15. package/dist/esm/widgets/pipes/pipes.d.ts +10 -1
  16. package/dist/esm/widgets/pipes/pipes.d.ts.map +1 -1
  17. package/dist/esm/widgets/pipes/pipes.js +1 -1
  18. package/dist/esm/widgets/pipes/pipes.js.map +1 -1
  19. package/dist/esm/widgets/pipes-admin/pipes-admin.d.ts.map +1 -1
  20. package/dist/esm/widgets/pipes-admin/pipes-admin.js +3 -8
  21. package/dist/esm/widgets/pipes-admin/pipes-admin.js.map +1 -1
  22. package/dist/esm/widgets/user-security/add-mfa-dialog.js +3 -3
  23. package/dist/esm/widgets/user-security/add-mfa-dialog.js.map +1 -1
  24. package/package.json +1 -1
  25. package/src/lib/elevated-access.tsx +18 -7
  26. package/src/widgets/pipes/pipes.tsx +1 -0
  27. package/src/widgets/pipes-admin/pipes-admin.tsx +6 -8
  28. package/src/widgets/user-security/add-mfa-dialog.tsx +10 -3
package/CHANGELOG.md CHANGED
@@ -1,13 +1,17 @@
1
1
  # Changelog
2
2
 
3
- ## 1.20.2-next.1792437930696
3
+ ## 1.20.2-next.1792439904014
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Correctly handle invalid date strings from the server.
8
8
 
9
+ - Preserve MFA enrollment progress when elevated access token expires mid-flow
10
+
9
11
  - Updated Widget translation file references.
10
12
 
13
+ - Honor `patternFlags` when validating configuration fields in `PipesAdmin`, so uppercase Snowflake account identifiers are accepted.
14
+
11
15
  - Memoize i18n translate function
12
16
 
13
17
  - Update internal GraphQL API calls
@@ -19,9 +19,17 @@ function ElevatedAccess({ type = "dialog", children, onVerified }) {
19
19
  const { elevatedAccess } = require_api_api_provider.useElevatedAccessToken();
20
20
  const [authenticationChallengeId, setAuthenticationChallengeId] = (0, react.useState)();
21
21
  const prevAccessToken = (0, react.useRef)(elevatedAccess);
22
+ const hasCalledOnVerified = (0, react.useRef)(false);
22
23
  (0, react.useEffect)(() => {
23
24
  prevAccessToken.current = elevatedAccess;
24
25
  }, [elevatedAccess]);
26
+ const handleVerificationSuccess = (0, react.useCallback)((elevatedAccessToken) => {
27
+ setAuthenticationChallengeId(void 0);
28
+ if (!hasCalledOnVerified.current) {
29
+ hasCalledOnVerified.current = true;
30
+ return onVerified?.(elevatedAccessToken);
31
+ }
32
+ }, [onVerified]);
25
33
  if (elevatedAccess) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children });
26
34
  if (!authenticationChallengeId) {
27
35
  const hasTokenExpired = !!prevAccessToken.current;
@@ -36,10 +44,7 @@ function ElevatedAccess({ type = "dialog", children, onVerified }) {
36
44
  if (authenticationChallengeId) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VerificationIdentityForm, {
37
45
  type,
38
46
  authenticationChallengeId,
39
- onSuccess: (elevatedAccessToken) => {
40
- setAuthenticationChallengeId(void 0);
41
- return onVerified?.(elevatedAccessToken);
42
- }
47
+ onSuccess: handleVerificationSuccess
43
48
  });
44
49
  return null;
45
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"elevated-access.cjs","names":["useElevatedAccessToken","useState","useRef","useMe","useClientGraphqlMutation","expectResultMember","Translation","Text","Callout","Flex","Button"],"sources":["../../../src/lib/elevated-access.tsx"],"sourcesContent":["import { Callout, Flex, Text } from \"@radix-ui/themes\";\nimport type { PropsWithChildren } from \"react\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { useElevatedAccessToken } from \"../api/api-provider.js\";\nimport { useClientGraphqlMutation } from \"../api/client-graphql/hooks.js\";\nimport { useMe } from \"./api/me.js\";\nimport { expectResultMember } from \"./client-graphql-result.js\";\nimport { AlertDialog, Button, Dialog } from \"./elements.js\";\nimport * as Form from \"./form.js\";\nimport { Translation } from \"./i18n/translation.js\";\nimport * as Otp from \"./otp-input.js\";\n\ninterface ElevatedAccessProps extends PropsWithChildren {\n onVerified?: (elevatedAccessToken: string) => Promise<unknown>;\n type?: \"dialog\" | \"alert\";\n}\n\nexport function ElevatedAccess({\n type = \"dialog\",\n children,\n onVerified,\n}: ElevatedAccessProps) {\n const { elevatedAccess } = useElevatedAccessToken();\n const [authenticationChallengeId, setAuthenticationChallengeId] =\n useState<string>();\n\n const prevAccessToken = useRef(elevatedAccess);\n\n useEffect(() => {\n prevAccessToken.current = elevatedAccess;\n }, [elevatedAccess]);\n\n if (elevatedAccess) {\n return <>{children}</>;\n }\n\n if (!authenticationChallengeId) {\n // FIXME: This should be refactored\n // eslint-disable-next-line react-hooks/refs\n const hasTokenExpired = !!prevAccessToken.current;\n\n return (\n <SendVerificationEmailForm\n type={type}\n hasTokenExpired={hasTokenExpired}\n onSuccess={(challengeId) => {\n setAuthenticationChallengeId(challengeId);\n }}\n />\n );\n }\n\n if (authenticationChallengeId) {\n return (\n <VerificationIdentityForm\n type={type}\n authenticationChallengeId={authenticationChallengeId}\n onSuccess={(elevatedAccessToken) => {\n // Reset the challenge id\n setAuthenticationChallengeId(undefined);\n\n return onVerified?.(elevatedAccessToken);\n }}\n />\n );\n }\n\n return null;\n}\n\ninterface SendVerificationEmailFormProps {\n onSuccess: (challengeId: string) => unknown | Promise<unknown>;\n type: \"dialog\" | \"alert\";\n hasTokenExpired: boolean;\n}\n\nfunction SendVerificationEmailForm({\n onSuccess,\n type,\n hasTokenExpired,\n}: SendVerificationEmailFormProps) {\n const { data: me } = useMe();\n const sendVerification = useClientGraphqlMutation({\n mutationFn: async (sdk) =>\n expectResultMember(\n (await sdk.SendVerificationCode()).sendVerificationCode,\n \"VerificationCodeSent\",\n ),\n onSuccess: (data) => onSuccess(data.authenticationChallengeId),\n });\n\n const Title = type === \"dialog\" ? Dialog.Title : AlertDialog.Title;\n const Description =\n type === \"dialog\" ? Dialog.Description : AlertDialog.Description;\n const Close = type === \"dialog\" ? Dialog.Close : AlertDialog.Cancel;\n\n const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n\n sendVerification.mutate();\n };\n\n return (\n <form onSubmit={handleSubmit}>\n <Title>\n {hasTokenExpired ? (\n <Translation\n defaultMessage=\"Your verification token has expired\"\n id=\"lb/AsC\"\n description=\"Dialog title when verification token has expired\"\n />\n ) : (\n <Translation\n defaultMessage=\"Verify your identity\"\n id=\"7tGCOh\"\n description=\"Dialog title for identity verification\"\n />\n )}\n </Title>\n\n <Description mb=\"5\">\n <Translation\n defaultMessage=\"To continue, we need to confirm your identity. We'll send a temporary verification code to {email}.\"\n id=\"FTUSRM\"\n description=\"Description explaining verification code will be sent\"\n values={{\n email: (\n <Text weight=\"bold\" highContrast>\n {me?.email}\n </Text>\n ),\n }}\n />\n </Description>\n\n {sendVerification.error && (\n <Callout.Root color=\"red\" mt=\"-2\" mb=\"0\">\n <Callout.Text>\n {getMutationErrorMessage(sendVerification.error)}\n </Callout.Text>\n </Callout.Root>\n )}\n\n <Flex justify=\"end\" align=\"center\" gap=\"3\" mt=\"5\">\n <Close>\n <Button\n variant=\"secondary\"\n type=\"button\"\n disabled={sendVerification.isPending}\n >\n <Translation\n defaultMessage=\"Cancel\"\n id=\"hHNj31\"\n description=\"Cancel button text\"\n />\n </Button>\n </Close>\n <Button type=\"submit\" loading={sendVerification.isPending}>\n <Translation\n defaultMessage=\"Send verification code\"\n id=\"XsTeXJ\"\n description=\"Button text to send verification code\"\n />\n </Button>\n </Flex>\n </form>\n );\n}\n\ninterface VerificationIdentityFormProps {\n onSuccess?: (elevatedAccessToken: string) => unknown | Promise<unknown>;\n authenticationChallengeId: string;\n type: \"dialog\" | \"alert\";\n}\n\nfunction VerificationIdentityForm({\n onSuccess,\n authenticationChallengeId,\n type,\n}: VerificationIdentityFormProps) {\n const { data: me } = useMe();\n const { setElevatedAccess } = useElevatedAccessToken();\n const verifyIdentity = useClientGraphqlMutation({\n mutationFn: async (\n sdk,\n input: { code: string; authenticationChallengeId: string },\n ) =>\n expectResultMember(\n (await sdk.VerifyCurrentEmail({ input })).verifyCurrentEmail,\n \"CurrentEmailVerified\",\n ),\n });\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [otpValue, setOtpValue] = useState<string>(\"\");\n\n const Title = type === \"dialog\" ? Dialog.Title : AlertDialog.Title;\n const Description =\n type === \"dialog\" ? Dialog.Description : AlertDialog.Description;\n const Close = type === \"dialog\" ? Dialog.Close : AlertDialog.Cancel;\n const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n\n const formData = new FormData(event.currentTarget);\n const code = formData.get(\"otp-code\")?.toString() ?? \"\";\n\n setIsSubmitting(true);\n\n try {\n // Mutate async so we can wait for the onSuccess callback as well\n const newAuthState = await verifyIdentity.mutateAsync({\n code,\n authenticationChallengeId,\n });\n\n setElevatedAccess({\n token: newAuthState.elevatedAccessToken,\n expiresAt: newAuthState.expiresAt,\n });\n\n if (onSuccess) {\n await new Promise((resolve) => setTimeout(resolve, 200));\n await onSuccess(newAuthState.elevatedAccessToken);\n }\n } catch (error) {\n console.error(error);\n }\n\n setIsSubmitting(false);\n };\n\n return (\n <Form.Root onSubmit={handleSubmit}>\n <Title>\n <Translation\n defaultMessage=\"Verify your identity\"\n id=\"7tGCOh\"\n description=\"Dialog title for identity verification\"\n />\n </Title>\n\n <Description>\n <Translation\n defaultMessage=\"A verification code was sent to {email}. Please enter it below.\"\n id=\"kvxE0S\"\n description=\"Description explaining where verification code was sent\"\n values={{\n email: (\n <Text weight=\"bold\" highContrast>\n {me?.email}\n </Text>\n ),\n }}\n />\n </Description>\n\n <Flex direction=\"column\" gap=\"2\" mt=\"5\" mx=\"auto\" width=\"fit-content\">\n <Otp.Root\n autoSubmit\n gap=\"2\"\n justify=\"center\"\n columns=\"repeat(6, 48px)\"\n width=\"fit-content\"\n rows=\"48px\"\n name=\"otp-code\"\n readOnly={isSubmitting}\n value={otpValue}\n onValueChange={setOtpValue}\n >\n <Otp.Input required autoFocus autoComplete=\"off\" />\n <Otp.Input required />\n <Otp.Input required />\n <Otp.Input required />\n <Otp.Input required />\n <Otp.Input required />\n </Otp.Root>\n\n {verifyIdentity.error && (\n <Text color=\"red\" size=\"2\" as=\"p\">\n {getMutationErrorMessage(verifyIdentity.error)}\n </Text>\n )}\n </Flex>\n\n <Flex justify=\"end\" align=\"center\" gap=\"3\" mt=\"5\">\n <Close>\n <Button variant=\"secondary\" type=\"button\">\n <Translation\n defaultMessage=\"Cancel\"\n id=\"hHNj31\"\n description=\"Cancel button text\"\n />\n </Button>\n </Close>\n <Button type=\"submit\" loading={isSubmitting}>\n <Translation\n defaultMessage=\"Confirm\"\n id=\"EmYENK\"\n description=\"Confirm button text for verification\"\n />\n </Button>\n </Flex>\n </Form.Root>\n );\n}\n\nfunction getMutationErrorMessage(error: unknown) {\n let message = typeof error === \"string\" ? error : \"\";\n\n if (error instanceof Error) {\n message = error.message;\n } else if (\n typeof error === \"object\" &&\n error !== null &&\n \"message\" in error &&\n typeof error.message === \"string\"\n ) {\n message = error.message;\n }\n\n if (!message || message === \"Bad Request\") {\n message = \"Invalid code, please try again.\";\n }\n\n return message;\n}\n\n// Note: Error messages in getMutationErrorMessage are kept as plain strings\n// since they are displayed dynamically\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,SAAgB,eAAe,EAC7B,OAAO,UACP,UACA,cACsB;CACtB,MAAM,EAAE,mBAAmBA,yBAAAA,uBAAuB;CAClD,MAAM,CAAC,2BAA2B,iCAAA,GAChCC,MAAAA,SAAAA,CAAiB;CAEnB,MAAM,mBAAA,GAAkBC,MAAAA,OAAAA,CAAO,cAAc;CAE7C,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,gBAAgB,UAAU;CAC5B,GAAG,CAAC,cAAc,CAAC;CAEnB,IAAI,gBACF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAA,kBAAA,UAAA,EAAG,SAAW,CAAA;CAGvB,IAAI,CAAC,2BAA2B;EAG9B,MAAM,kBAAkB,CAAC,CAAC,gBAAgB;EAE1C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,2BAAD;GACQ;GACW;GACjB,YAAY,gBAAgB;IAC1B,6BAA6B,WAAW;GAC1C;EACD,CAAA;CAEL;CAEA,IAAI,2BACF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAD;EACQ;EACqB;EAC3B,YAAY,wBAAwB;GAElC,6BAA6B,MAAS;GAEtC,OAAO,aAAa,mBAAmB;EACzC;CACD,CAAA;CAIL,OAAO;AACT;AAQA,SAAS,0BAA0B,EACjC,WACA,MACA,mBACiC;CACjC,MAAM,EAAE,MAAM,OAAOC,mBAAAA,MAAM;CAC3B,MAAM,mBAAmBC,iCAAAA,yBAAyB;EAChD,YAAY,OAAO,QACjBC,kCAAAA,oBACG,MAAM,IAAI,qBAAqB,EAAA,CAAG,sBACnC,sBACF;EACF,YAAY,SAAS,UAAU,KAAK,yBAAyB;CAC/D,CAAC;CAED,MAAM,QAAQ,SAAS,WAAA,mCAAA,QAAA,yCAAA;CACvB,MAAM,cACJ,SAAS,WAAA,4BA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MAAM;CAGlB,IAAI,CAAC,WAAW,YAAY,eAC1B,UAAU;CAGZ,OAAO;AACT"}
1
+ {"version":3,"file":"elevated-access.cjs","names":["useElevatedAccessToken","useState","useRef","useCallback","useMe","useClientGraphqlMutation","expectResultMember","Translation","Text","Callout","Flex","Button"],"sources":["../../../src/lib/elevated-access.tsx"],"sourcesContent":["import { Callout, Flex, Text } from \"@radix-ui/themes\";\nimport type { PropsWithChildren } from \"react\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useElevatedAccessToken } from \"../api/api-provider.js\";\nimport { useClientGraphqlMutation } from \"../api/client-graphql/hooks.js\";\nimport { useMe } from \"./api/me.js\";\nimport { expectResultMember } from \"./client-graphql-result.js\";\nimport { AlertDialog, Button, Dialog } from \"./elements.js\";\nimport * as Form from \"./form.js\";\nimport { Translation } from \"./i18n/translation.js\";\nimport * as Otp from \"./otp-input.js\";\n\ninterface ElevatedAccessProps extends PropsWithChildren {\n onVerified?: (elevatedAccessToken: string) => Promise<unknown>;\n type?: \"dialog\" | \"alert\";\n}\n\nexport function ElevatedAccess({\n type = \"dialog\",\n children,\n onVerified,\n}: ElevatedAccessProps) {\n const { elevatedAccess } = useElevatedAccessToken();\n const [authenticationChallengeId, setAuthenticationChallengeId] =\n useState<string>();\n\n const prevAccessToken = useRef(elevatedAccess);\n const hasCalledOnVerified = useRef(false);\n\n useEffect(() => {\n prevAccessToken.current = elevatedAccess;\n }, [elevatedAccess]);\n\n const handleVerificationSuccess = useCallback(\n (elevatedAccessToken: string) => {\n setAuthenticationChallengeId(undefined);\n\n // Only call onVerified on the initial verification, not on\n // re-verifications after token expiry, so side effects (e.g. creating a\n // new TOTP factor) don't re-run and discard the user's progress.\n if (!hasCalledOnVerified.current) {\n hasCalledOnVerified.current = true;\n return onVerified?.(elevatedAccessToken);\n }\n },\n [onVerified],\n );\n\n if (elevatedAccess) {\n return <>{children}</>;\n }\n\n if (!authenticationChallengeId) {\n // FIXME: This should be refactored\n // eslint-disable-next-line react-hooks/refs\n const hasTokenExpired = !!prevAccessToken.current;\n\n return (\n <SendVerificationEmailForm\n type={type}\n hasTokenExpired={hasTokenExpired}\n onSuccess={(challengeId) => {\n setAuthenticationChallengeId(challengeId);\n }}\n />\n );\n }\n\n if (authenticationChallengeId) {\n return (\n <VerificationIdentityForm\n type={type}\n authenticationChallengeId={authenticationChallengeId}\n onSuccess={handleVerificationSuccess}\n />\n );\n }\n\n return null;\n}\n\ninterface SendVerificationEmailFormProps {\n onSuccess: (challengeId: string) => unknown | Promise<unknown>;\n type: \"dialog\" | \"alert\";\n hasTokenExpired: boolean;\n}\n\nfunction SendVerificationEmailForm({\n onSuccess,\n type,\n hasTokenExpired,\n}: SendVerificationEmailFormProps) {\n const { data: me } = useMe();\n const sendVerification = useClientGraphqlMutation({\n mutationFn: async (sdk) =>\n expectResultMember(\n (await sdk.SendVerificationCode()).sendVerificationCode,\n \"VerificationCodeSent\",\n ),\n onSuccess: (data) => onSuccess(data.authenticationChallengeId),\n });\n\n const Title = type === \"dialog\" ? Dialog.Title : AlertDialog.Title;\n const Description =\n type === \"dialog\" ? Dialog.Description : AlertDialog.Description;\n const Close = type === \"dialog\" ? Dialog.Close : AlertDialog.Cancel;\n\n const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n\n sendVerification.mutate();\n };\n\n return (\n <form onSubmit={handleSubmit}>\n <Title>\n {hasTokenExpired ? (\n <Translation\n defaultMessage=\"Your verification token has expired\"\n id=\"lb/AsC\"\n description=\"Dialog title when verification token has expired\"\n />\n ) : (\n <Translation\n defaultMessage=\"Verify your identity\"\n id=\"7tGCOh\"\n description=\"Dialog title for identity verification\"\n />\n )}\n </Title>\n\n <Description mb=\"5\">\n <Translation\n defaultMessage=\"To continue, we need to confirm your identity. We'll send a temporary verification code to {email}.\"\n id=\"FTUSRM\"\n description=\"Description explaining verification code will be sent\"\n values={{\n email: (\n <Text weight=\"bold\" highContrast>\n {me?.email}\n </Text>\n ),\n }}\n />\n </Description>\n\n {sendVerification.error && (\n <Callout.Root color=\"red\" mt=\"-2\" mb=\"0\">\n <Callout.Text>\n {getMutationErrorMessage(sendVerification.error)}\n </Callout.Text>\n </Callout.Root>\n )}\n\n <Flex justify=\"end\" align=\"center\" gap=\"3\" mt=\"5\">\n <Close>\n <Button\n variant=\"secondary\"\n type=\"button\"\n disabled={sendVerification.isPending}\n >\n <Translation\n defaultMessage=\"Cancel\"\n id=\"hHNj31\"\n description=\"Cancel button text\"\n />\n </Button>\n </Close>\n <Button type=\"submit\" loading={sendVerification.isPending}>\n <Translation\n defaultMessage=\"Send verification code\"\n id=\"XsTeXJ\"\n description=\"Button text to send verification code\"\n />\n </Button>\n </Flex>\n </form>\n );\n}\n\ninterface VerificationIdentityFormProps {\n onSuccess?: (elevatedAccessToken: string) => unknown | Promise<unknown>;\n authenticationChallengeId: string;\n type: \"dialog\" | \"alert\";\n}\n\nfunction VerificationIdentityForm({\n onSuccess,\n authenticationChallengeId,\n type,\n}: VerificationIdentityFormProps) {\n const { data: me } = useMe();\n const { setElevatedAccess } = useElevatedAccessToken();\n const verifyIdentity = useClientGraphqlMutation({\n mutationFn: async (\n sdk,\n input: { code: string; authenticationChallengeId: string },\n ) =>\n expectResultMember(\n (await sdk.VerifyCurrentEmail({ input })).verifyCurrentEmail,\n \"CurrentEmailVerified\",\n ),\n });\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [otpValue, setOtpValue] = useState<string>(\"\");\n\n const Title = type === \"dialog\" ? Dialog.Title : AlertDialog.Title;\n const Description =\n type === \"dialog\" ? Dialog.Description : AlertDialog.Description;\n const Close = type === \"dialog\" ? Dialog.Close : AlertDialog.Cancel;\n const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n\n const formData = new FormData(event.currentTarget);\n const code = formData.get(\"otp-code\")?.toString() ?? \"\";\n\n setIsSubmitting(true);\n\n try {\n // Mutate async so we can wait for the onSuccess callback as well\n const newAuthState = await verifyIdentity.mutateAsync({\n code,\n authenticationChallengeId,\n });\n\n setElevatedAccess({\n token: newAuthState.elevatedAccessToken,\n expiresAt: newAuthState.expiresAt,\n });\n\n if (onSuccess) {\n await new Promise((resolve) => setTimeout(resolve, 200));\n await onSuccess(newAuthState.elevatedAccessToken);\n }\n } catch (error) {\n console.error(error);\n }\n\n setIsSubmitting(false);\n };\n\n return (\n <Form.Root onSubmit={handleSubmit}>\n <Title>\n <Translation\n defaultMessage=\"Verify your identity\"\n id=\"7tGCOh\"\n description=\"Dialog title for identity verification\"\n />\n </Title>\n\n <Description>\n <Translation\n defaultMessage=\"A verification code was sent to {email}. Please enter it below.\"\n id=\"kvxE0S\"\n description=\"Description explaining where verification code was sent\"\n values={{\n email: (\n <Text weight=\"bold\" highContrast>\n {me?.email}\n </Text>\n ),\n }}\n />\n </Description>\n\n <Flex direction=\"column\" gap=\"2\" mt=\"5\" mx=\"auto\" width=\"fit-content\">\n <Otp.Root\n autoSubmit\n gap=\"2\"\n justify=\"center\"\n columns=\"repeat(6, 48px)\"\n width=\"fit-content\"\n rows=\"48px\"\n name=\"otp-code\"\n readOnly={isSubmitting}\n value={otpValue}\n onValueChange={setOtpValue}\n >\n <Otp.Input required autoFocus autoComplete=\"off\" />\n <Otp.Input required />\n <Otp.Input required />\n <Otp.Input required />\n <Otp.Input required />\n <Otp.Input required />\n </Otp.Root>\n\n {verifyIdentity.error && (\n <Text color=\"red\" size=\"2\" as=\"p\">\n {getMutationErrorMessage(verifyIdentity.error)}\n </Text>\n )}\n </Flex>\n\n <Flex justify=\"end\" align=\"center\" gap=\"3\" mt=\"5\">\n <Close>\n <Button variant=\"secondary\" type=\"button\">\n <Translation\n defaultMessage=\"Cancel\"\n id=\"hHNj31\"\n description=\"Cancel button text\"\n />\n </Button>\n </Close>\n <Button type=\"submit\" loading={isSubmitting}>\n <Translation\n defaultMessage=\"Confirm\"\n id=\"EmYENK\"\n description=\"Confirm button text for verification\"\n />\n </Button>\n </Flex>\n </Form.Root>\n );\n}\n\nfunction getMutationErrorMessage(error: unknown) {\n let message = typeof error === \"string\" ? error : \"\";\n\n if (error instanceof Error) {\n message = error.message;\n } else if (\n typeof error === \"object\" &&\n error !== null &&\n \"message\" in error &&\n typeof error.message === \"string\"\n ) {\n message = error.message;\n }\n\n if (!message || message === \"Bad Request\") {\n message = \"Invalid code, please try again.\";\n }\n\n return message;\n}\n\n// Note: Error messages in getMutationErrorMessage are kept as plain strings\n// since they are displayed dynamically\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,SAAgB,eAAe,EAC7B,OAAO,UACP,UACA,cACsB;CACtB,MAAM,EAAE,mBAAmBA,yBAAAA,uBAAuB;CAClD,MAAM,CAAC,2BAA2B,iCAAA,GAChCC,MAAAA,SAAAA,CAAiB;CAEnB,MAAM,mBAAA,GAAkBC,MAAAA,OAAAA,CAAO,cAAc;CAC7C,MAAM,uBAAA,GAAsBA,MAAAA,OAAAA,CAAO,KAAK;CAExC,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,gBAAgB,UAAU;CAC5B,GAAG,CAAC,cAAc,CAAC;CAEnB,MAAM,6BAAA,GAA4BC,MAAAA,YAAAA,EAC/B,wBAAgC;EAC/B,6BAA6B,MAAS;EAKtC,IAAI,CAAC,oBAAoB,SAAS;GAChC,oBAAoB,UAAU;GAC9B,OAAO,aAAa,mBAAmB;EACzC;CACF,GACA,CAAC,UAAU,CACb;CAEA,IAAI,gBACF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAA,kBAAA,UAAA,EAAG,SAAW,CAAA;CAGvB,IAAI,CAAC,2BAA2B;EAG9B,MAAM,kBAAkB,CAAC,CAAC,gBAAgB;EAE1C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,2BAAD;GACQ;GACW;GACjB,YAAY,gBAAgB;IAC1B,6BAA6B,WAAW;GAC1C;EACD,CAAA;CAEL;CAEA,IAAI,2BACF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAD;EACQ;EACqB;EAC3B,WA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A,IAAA,CAACI,qBAAAA,QAAD;KAAQ,MAAK;KAAS,SAAS;KAC7B,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACJ,6BAAAA,aAAD;MACE,gBAAe;MACf,IAAG;MACH,aAAY;KACb,CAAA;IACK,CAAA,CACJ;;EACG;;AAEf;AAEA,SAAS,wBAAwB,OAAgB;CAC/C,IAAI,UAAU,OAAO,UAAU,WAAW,QAAQ;CAElD,IAAI,iBAAiB,OACnB,UAAU,MAAM;MACX,IACL,OAAO,UAAU,YACjB,UAAU,QACV,aAAa,SACb,OAAO,MAAM,YAAY,UAEzB,UAAU,MAAM;CAGlB,IAAI,CAAC,WAAW,YAAY,eAC1B,UAAU;CAGZ,OAAO;AACT"}
@@ -2180,6 +2180,7 @@ exports.PipesError = PipesError;
2180
2180
  exports.PipesLoading = PipesLoading;
2181
2181
  exports.PipesSection = PipesSection;
2182
2182
  exports.PipesSections = PipesSections;
2183
+ exports.compileConfigFieldPattern = compileConfigFieldPattern;
2183
2184
  exports.getUnpinnedInstallationFields = getUnpinnedInstallationFields;
2184
2185
  exports.useAddConnectionFlow = useAddConnectionFlow;
2185
2186
  exports.useOpenDataIntegrationAuthorizeUrl = useOpenDataIntegrationAuthorizeUrl;