@civic/auth 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared/components/CivicAuthIframe.d.ts.map +1 -1
- package/dist/shared/components/CivicAuthIframe.js +5 -2
- package/dist/shared/components/CivicAuthIframe.js.map +1 -1
- package/dist/shared/components/CivicAuthIframeContainer.d.ts.map +1 -1
- package/dist/shared/components/CivicAuthIframeContainer.js +42 -38
- package/dist/shared/components/CivicAuthIframeContainer.js.map +1 -1
- package/dist/shared/components/LoadingIcon.d.ts +7 -4
- package/dist/shared/components/LoadingIcon.d.ts.map +1 -1
- package/dist/shared/components/LoadingIcon.js +3 -2
- package/dist/shared/components/LoadingIcon.js.map +1 -1
- package/dist/shared/version.d.ts +1 -1
- package/dist/shared/version.js +1 -1
- package/dist/shared/version.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CivicAuthIframe.d.ts","sourceRoot":"","sources":["../../../src/shared/components/CivicAuthIframe.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,KAAK,oBAAoB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,QAAA,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"CivicAuthIframe.d.ts","sourceRoot":"","sources":["../../../src/shared/components/CivicAuthIframe.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,KAAK,oBAAoB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,QAAA,MAAM,eAAe,gGAwDpB,CAAC;AAIF,YAAY,EAAE,oBAAoB,EAAE,CAAC;AAErC,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -20,12 +20,15 @@ const CivicAuthIframe = forwardRef(({ onLoad, id }, ref) => {
|
|
|
20
20
|
// license="1jy4dww5qzv-s54r73oxcn-v59f4kfgfz"
|
|
21
21
|
id: id, forwardRef: ref, "data-testid": "civic-auth-iframe-with-resizer", style: {
|
|
22
22
|
// we don't want the letterbox effect in embedded mode
|
|
23
|
-
height
|
|
23
|
+
// setting a min and max height so the resizer does not jump up/down when the iframe is loaded
|
|
24
|
+
height: iframeMode !== "embedded" ? "26px" : "max-content",
|
|
25
|
+
minHeight: "225px",
|
|
26
|
+
maxHeight: "600px",
|
|
24
27
|
width: "100%",
|
|
25
28
|
border: "none",
|
|
26
29
|
minWidth: "100%",
|
|
27
30
|
backgroundColor,
|
|
28
|
-
transition: "height 0.25s ease",
|
|
31
|
+
transition: "height 0.25s ease-in-out",
|
|
29
32
|
pointerEvents: "auto",
|
|
30
33
|
borderRadius: "24px",
|
|
31
34
|
}, checkOrigin: false, onLoad: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CivicAuthIframe.js","sourceRoot":"","sources":["../../../src/shared/components/CivicAuthIframe.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,qDAAqD;AACrD,OAAO,aAAa,MAAM,sBAAsB,CAAC;AACjD,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAOlD,MAAM,eAAe,GAAG,UAAU,CAChC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE;IACtB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,SAAS,EAAE,CAAC;IACpD,MAAM,C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vB,gEAAgE;gBAChE,cAAc,EAAE,CAAC,GACjB,IACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAIhD,OAAO,EAAE,eAAe,EAAE,CAAC","sourcesContent":["\"use client\";\nimport React, { forwardRef, useEffect, useState } from \"react\";\n// import IframeResizer from \"@iframe-resizer/react\";\nimport IframeResizer from \"iframe-resizer-react\";\nimport SVGLoading from \"./SVGLoading.js\";\nimport { useIframe } from \"../hooks/useIframe.js\";\n\ntype CivicAuthIframeProps = {\n onLoad?: () => void;\n id: string;\n};\n\nconst CivicAuthIframe = forwardRef<HTMLIFrameElement, CivicAuthIframeProps>(\n ({ onLoad, id }, ref) => {\n const [isLoaded, setIsLoaded] = React.useState(false);\n const { iframeMode, backgroundColor } = useIframe();\n const [isClient, setIsClient] = useState(false);\n useEffect(() => {\n // only runs on client\n setIsClient(true);\n }, []);\n // don't render on the server as the appearance changes when the iframe is loaded from login-app post-messages\n return !isClient ? null : (\n <div>\n {isLoaded ? null : (\n <span data-testid=\"iframe-shimmer-loader\">\n {iframeMode !== \"embedded\" && (\n <SVGLoading backgroundColor={backgroundColor} />\n )}\n </span>\n )}\n <IframeResizer\n inPageLinks\n // iframe-resizer-react was downgraded due to a bug in the latest version\n // the license field is not valid for the downgraded version\n // license=\"1jy4dww5qzv-s54r73oxcn-v59f4kfgfz\"\n id={id}\n forwardRef={ref}\n data-testid={\"civic-auth-iframe-with-resizer\"}\n style={{\n // we don't want the letterbox effect in embedded mode\n // setting a min and max height so the resizer does not jump up/down when the iframe is loaded\n height: iframeMode !== \"embedded\" ? \"26px\" : \"max-content\",\n minHeight: \"225px\",\n maxHeight: \"600px\",\n width: \"100%\",\n border: \"none\",\n minWidth: \"100%\",\n backgroundColor,\n transition: \"height 0.25s ease-in-out\",\n pointerEvents: \"auto\",\n borderRadius: \"24px\",\n }}\n checkOrigin={false}\n onLoad={() => {\n setIsLoaded(true);\n onLoad?.();\n }}\n allow=\"camera; screen-wake-lock\"\n allowFullScreen\n // iframe-resizer-react was downgraded due to a bug in the latest version\n // direction=\"vertical\"\n // the 'direction' field is not valid for the downgraded version\n warningTimeout={0}\n />\n </div>\n );\n },\n);\n\nCivicAuthIframe.displayName = \"CivicAuthIframe\";\n\nexport type { CivicAuthIframeProps };\n\nexport { CivicAuthIframe };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CivicAuthIframeContainer.d.ts","sourceRoot":"","sources":["../../../src/shared/components/CivicAuthIframeContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAUxE,KAAK,6BAA6B,GAAG;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAeF,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,OAAO,EACP,aAAa,GACd,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;CACxB,
|
|
1
|
+
{"version":3,"file":"CivicAuthIframeContainer.d.ts","sourceRoot":"","sources":["../../../src/shared/components/CivicAuthIframeContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAUxE,KAAK,6BAA6B,GAAG;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAeF,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,OAAO,EACP,aAAa,GACd,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;CACxB,oDAgEA;AAED,QAAA,MAAM,wBAAwB,GAAI,+BAG/B,6BAA6B,qDAmJ/B,CAAC;AAEF,YAAY,EAAE,6BAA6B,EAAE,CAAC;AAE9C,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -13,22 +13,8 @@ function NoChrome({ children, }) {
|
|
|
13
13
|
return (_jsx("div", { "data-testid": "civic-iframe-no-chrome", style: { position: "relative" }, children: children }));
|
|
14
14
|
}
|
|
15
15
|
export function IframeChrome({ children, onClose, isFrameLoaded, }) {
|
|
16
|
-
const { setIframeAborted
|
|
17
|
-
const iframeContainerStyleOverrides = iframeMode === "embedded"
|
|
18
|
-
? {
|
|
19
|
-
paddingTop: "1.5rem",
|
|
20
|
-
borderRadius: "1.5rem",
|
|
21
|
-
}
|
|
22
|
-
: {
|
|
23
|
-
...(isFrameLoaded
|
|
24
|
-
? {
|
|
25
|
-
paddingTop: "1.5rem",
|
|
26
|
-
borderRadius: "1.5rem",
|
|
27
|
-
}
|
|
28
|
-
: { borderRadius: "0.5rem", paddingTop: "0" }),
|
|
29
|
-
};
|
|
16
|
+
const { setIframeAborted } = useIframe();
|
|
30
17
|
return (_jsx("div", { style: {
|
|
31
|
-
position: "fixed", // Change to fixed to stay in viewport
|
|
32
18
|
left: 0,
|
|
33
19
|
top: 0,
|
|
34
20
|
zIndex: 50,
|
|
@@ -37,8 +23,8 @@ export function IframeChrome({ children, onClose, isFrameLoaded, }) {
|
|
|
37
23
|
width: "100vw",
|
|
38
24
|
alignItems: "center",
|
|
39
25
|
justifyContent: "center",
|
|
40
|
-
backgroundColor: "rgba(17, 24, 39, 0.5)",
|
|
41
|
-
backdropFilter: "blur(4px)",
|
|
26
|
+
backgroundColor: "rgba(17, 24, 39, 0.5)",
|
|
27
|
+
backdropFilter: "blur(4px)",
|
|
42
28
|
}, onClick: () => {
|
|
43
29
|
setIframeAborted(true);
|
|
44
30
|
onClose?.();
|
|
@@ -48,10 +34,8 @@ export function IframeChrome({ children, onClose, isFrameLoaded, }) {
|
|
|
48
34
|
paddingLeft: "0",
|
|
49
35
|
paddingRight: "0",
|
|
50
36
|
paddingBottom: "0",
|
|
51
|
-
// paddingTop gets added in style overrides
|
|
52
|
-
...iframeContainerStyleOverrides,
|
|
53
37
|
boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
54
|
-
|
|
38
|
+
width: "20rem",
|
|
55
39
|
}, onClick: (e) => e.stopPropagation(), children: [isFrameLoaded && (_jsx("button", { style: {
|
|
56
40
|
position: "absolute",
|
|
57
41
|
right: "1rem",
|
|
@@ -61,7 +45,7 @@ export function IframeChrome({ children, onClose, isFrameLoaded, }) {
|
|
|
61
45
|
alignItems: "center",
|
|
62
46
|
justifyContent: "center",
|
|
63
47
|
border: "none",
|
|
64
|
-
backgroundColor: "
|
|
48
|
+
backgroundColor: "white",
|
|
65
49
|
padding: "0.25rem",
|
|
66
50
|
color: "#9ca3af",
|
|
67
51
|
}, onClick: () => {
|
|
@@ -74,7 +58,10 @@ const CivicAuthIframeContainer = ({ onClose, closeOnRedirect = true, }) => {
|
|
|
74
58
|
const [tokenExchangeUrl, setTokenExchangeUrl] = useState(null);
|
|
75
59
|
const { doTokenExchange } = useClientTokenExchangeSession();
|
|
76
60
|
const { iframeRef, iframeMode, backgroundColor, setIframeMounted } = useIframe();
|
|
61
|
+
const [isIframeContentLoaded, setIsIframeContentLoaded] = useState(false);
|
|
62
|
+
const [isClient, setIsClient] = useState(false);
|
|
77
63
|
useEffect(() => {
|
|
64
|
+
setIsClient(true);
|
|
78
65
|
setIframeMounted(true);
|
|
79
66
|
}, [setIframeMounted]);
|
|
80
67
|
useEffect(() => {
|
|
@@ -132,7 +119,6 @@ const CivicAuthIframeContainer = ({ onClose, closeOnRedirect = true, }) => {
|
|
|
132
119
|
window.addEventListener("keydown", handleEscape);
|
|
133
120
|
return () => window.removeEventListener("keydown", handleEscape);
|
|
134
121
|
});
|
|
135
|
-
const [isIframeContentLoaded, setIsIframeContentLoaded] = useState(false);
|
|
136
122
|
const handleIframeLoad = useCallback(() => {
|
|
137
123
|
setIsIframeContentLoaded(true);
|
|
138
124
|
const iframeHasUrl = processIframeUrl();
|
|
@@ -141,22 +127,40 @@ const CivicAuthIframeContainer = ({ onClose, closeOnRedirect = true, }) => {
|
|
|
141
127
|
}
|
|
142
128
|
}, [processIframeUrl, intervalId]);
|
|
143
129
|
const WrapperComponent = iframeMode === "embedded" ? NoChrome : IframeChrome;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
130
|
+
return (_jsx(WrapperComponent, { onClose: onClose, isFrameLoaded: isIframeContentLoaded, children: _jsxs("div", { style: {
|
|
131
|
+
position: "relative",
|
|
132
|
+
height: isIframeContentLoaded ? "auto" : "225px",
|
|
133
|
+
display: "flex",
|
|
134
|
+
flexDirection: "row",
|
|
135
|
+
justifyContent: "center",
|
|
136
|
+
backgroundColor: isClient ? backgroundColor : "#8E949D",
|
|
137
|
+
borderRadius: "24px",
|
|
138
|
+
width: "100%",
|
|
139
|
+
transition: "all 0.5s ease-in-out",
|
|
140
|
+
}, children: [_jsx("div", { id: "civic-auth-loading-icon-wrapper", style: {
|
|
141
|
+
position: "absolute",
|
|
142
|
+
inset: 0,
|
|
143
|
+
display: isIframeContentLoaded ? "none" : "flex",
|
|
144
|
+
alignItems: "center",
|
|
145
|
+
justifyContent: "center",
|
|
146
|
+
backgroundColor: isClient ? backgroundColor : "#8E949D",
|
|
147
|
+
borderRadius: "24px",
|
|
148
|
+
height: "225px",
|
|
149
|
+
width: "100%",
|
|
150
|
+
transition: "all 0.5s ease-in-out",
|
|
151
|
+
}, children: _jsx(LoadingIcon, {}) }), isClient && (_jsx("div", { style: {
|
|
152
|
+
visibility: isIframeContentLoaded ? "visible" : "hidden",
|
|
153
|
+
display: "flex",
|
|
154
|
+
height: "100%",
|
|
155
|
+
width: "100%",
|
|
156
|
+
minWidth: "100%",
|
|
157
|
+
alignItems: "center",
|
|
158
|
+
justifyContent: "center",
|
|
159
|
+
borderRadius: "24px",
|
|
160
|
+
overflow: "hidden",
|
|
161
|
+
backgroundColor,
|
|
162
|
+
transition: "all 0.5s ease-in-out",
|
|
163
|
+
}, children: _jsx(CivicAuthIframe, { ref: iframeRef, id: "civic-auth-iframe", onLoad: handleIframeLoad }) }))] }) }));
|
|
160
164
|
};
|
|
161
165
|
export { CivicAuthIframeContainer };
|
|
162
166
|
//# sourceMappingURL=CivicAuthIframeContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CivicAuthIframeContainer.js","sourceRoot":"","sources":["../../../src/shared/components/CivicAuthIframeContainer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAOrD,SAAS,QAAQ,CAAC,EAChB,QAAQ,GAIT;IACC,OAAO,CACL,6BAAiB,wBAAwB,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,YACtE,QAAQ,GACL,CACP,CAAC;AACJ,CAA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,EAAE;QACb,sBAAsB;QACtB,WAAW,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,4FAA4F;IAC5F,OAAO,CACL,MAAC,gBAAgB,IAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,qBAAqB,aACrE,eAAe,IAAI,QAAQ,CAAC,CAAC,CAAC,CAC7B,cACE,EAAE,EAAC,iCAAiC,EACpC,KAAK,EAAE;oBACL,QAAQ,EAAE,UAAU;oBACpB,KAAK,EAAE,CAAC;oBACR,OAAO,EAAE,MAAM;oBACf,UAAU,EAAE,QAAQ;oBACpB,cAAc,EAAE,QAAQ;oBACxB,eAAe;oBACf,YAAY,EAAE,MAAM;iBACrB,YAED,KAAC,WAAW,KAAG,GACX,CACP,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,eAAe,IACd,GAAG,EAAE,SAAS,EACd,EAAE,EAAE,mBAAmB,EACvB,MAAM,EAAE,gBAAgB,GACxB,IACe,CACpB,CAAC;AACJ,CAAC,CAAC;AAIF,OAAO,EAAE,wBAAwB,EAAE,CAAC","sourcesContent":["\"use client\";\n\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { LoadingIcon } from \"@/shared/components/LoadingIcon.js\";\nimport { CloseIcon } from \"@/shared/components/CloseIcon.js\";\nimport { CivicAuthIframe } from \"@/shared/components/CivicAuthIframe.js\";\nimport { useIframe } from \"@/shared/hooks/index.js\";\nimport { TOKEN_EXCHANGE_TRIGGER_TEXT } from \"@/constants.js\";\nimport { useCivicAuthConfig } from \"@/shared/hooks/index.js\";\nimport { useClientTokenExchangeSession } from \"@/shared/hooks/index.js\";\nimport { getIframeRef } from \"../lib/iframeUtils.js\";\n\ntype CivicAuthIframeContainerProps = {\n onClose?: () => void;\n closeOnRedirect?: boolean;\n};\n\nfunction NoChrome({\n children,\n}: {\n children: React.ReactNode;\n onClose?: () => void;\n}) {\n return (\n <div data-testid=\"civic-iframe-no-chrome\" style={{ position: \"relative\" }}>\n {children}\n </div>\n );\n}\n\nexport function IframeChrome({\n children,\n onClose,\n isFrameLoaded,\n}: {\n children: React.ReactNode;\n onClose?: () => void;\n isFrameLoaded: boolean;\n}) {\n const { setIframeAborted, iframeMode } = useIframe();\n\n const iframeContainerStyleOverrides =\n iframeMode === \"embedded\"\n ? {\n paddingTop: \"1.5rem\",\n borderRadius: \"1.5rem\",\n }\n : {\n ...(isFrameLoaded\n ? {\n paddingTop: \"1.5rem\",\n borderRadius: \"1.5rem\",\n }\n : { borderRadius: \"0.5rem\", paddingTop: \"0\" }),\n };\n return (\n <div\n style={{\n position: \"fixed\", // Change to fixed to stay in viewport\n left: 0,\n top: 0,\n zIndex: 50,\n display: \"flex\",\n height: \"100vh\",\n width: \"100vw\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"rgba(17, 24, 39, 0.5)\", // Semi-transparent dark background\n backdropFilter: \"blur(4px)\", // Optional: adds slight blur to background\n }}\n onClick={() => {\n setIframeAborted(true);\n onClose?.();\n }}\n >\n <div\n data-testid=\"iframe-chrome\"\n style={{\n position: \"relative\",\n overflow: \"hidden\",\n paddingLeft: \"0\",\n paddingRight: \"0\",\n paddingBottom: \"0\",\n // paddingTop gets added in style overrides\n ...iframeContainerStyleOverrides,\n boxShadow:\n \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\n minWidth: \"20rem\",\n }}\n onClick={(e) => e.stopPropagation()}\n >\n {isFrameLoaded && (\n <button\n style={{\n position: \"absolute\",\n right: \"1rem\",\n top: \"2rem\",\n display: \"flex\",\n cursor: \"pointer\",\n alignItems: \"center\",\n justifyContent: \"center\",\n border: \"none\",\n backgroundColor: \"transparent\",\n padding: \"0.25rem\",\n color: \"#9ca3af\",\n }}\n onClick={() => {\n setIframeAborted(true);\n onClose?.();\n }}\n >\n <CloseIcon />\n </button>\n )}\n\n {children}\n </div>\n </div>\n );\n}\n\nconst CivicAuthIframeContainer = ({\n onClose,\n closeOnRedirect = true,\n}: CivicAuthIframeContainerProps) => {\n const config = useCivicAuthConfig();\n const [tokenExchangeUrl, setTokenExchangeUrl] = useState<string | null>(null);\n const { doTokenExchange } = useClientTokenExchangeSession();\n const { iframeRef, iframeMode, backgroundColor, setIframeMounted } =\n useIframe();\n\n useEffect(() => {\n setIframeMounted(true);\n }, [setIframeMounted]);\n\n useEffect(() => {\n if (tokenExchangeUrl) {\n doTokenExchange?.(tokenExchangeUrl);\n }\n }, [doTokenExchange, tokenExchangeUrl]);\n\n const processIframeUrl = useCallback(() => {\n if (!config) return;\n if (iframeRef && iframeRef.current) {\n const ref = getIframeRef(iframeRef.current)!;\n if (ref.contentWindow) {\n try {\n const iframeUrl = ref.contentWindow.location.href;\n // we know that oauth has finished when the iframe redirects to our redirectUrl\n if (iframeUrl.startsWith(config.redirectUrl)) {\n const iframeBody = ref.contentWindow.document.body.innerHTML;\n\n // If we're doing a server token exchange, we need to call the server a second time\n // using a fetch so that we're on the same domain and cookies can be sent and read\n // The server will use the presence of the code_verifier cookie to determine whether to do a token exchange or not.\n // On the initial (3rd party) redirect from the auth server, the cookie won't be sent, so the server-side callback route will just render a blank page,\n // and we'll do the exchange request from here, which will include the cookies.\n if (iframeBody.includes(TOKEN_EXCHANGE_TRIGGER_TEXT)) {\n const params = new URL(iframeUrl).searchParams;\n const appUrl = globalThis.window?.location?.origin;\n fetch(\n `${config.redirectUrl}?${params.toString()}&appUrl=${appUrl}`,\n );\n } else {\n // if we're doing token-exchange in the client, we can just set the authResponseUrl\n // to be handled by the auth provider\n // iframeRef.current.setAttribute(\"src\", \"\");\n setTokenExchangeUrl(iframeUrl);\n }\n\n if (closeOnRedirect) onClose?.();\n return true; // Successfully processed the URL\n }\n } catch {\n // ignore errors while waiting for redirect\n }\n }\n }\n return false; // Haven't processed the URL yet\n }, [closeOnRedirect, config, iframeRef, onClose]);\n\n const intervalId = useRef<NodeJS.Timeout>();\n\n const handleEscape = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n onClose?.();\n }\n },\n [onClose],\n );\n\n // handle Escape\n useEffect(() => {\n window.addEventListener(\"keydown\", handleEscape);\n\n return () => window.removeEventListener(\"keydown\", handleEscape);\n });\n\n const [isIframeContentLoaded, setIsIframeContentLoaded] = useState(false);\n const handleIframeLoad = useCallback(() => {\n setIsIframeContentLoaded(true);\n\n const iframeHasUrl = processIframeUrl();\n if (iframeHasUrl && intervalId.current) {\n clearInterval(intervalId.current);\n }\n }, [processIframeUrl, intervalId]);\n\n const WrapperComponent = iframeMode === \"embedded\" ? NoChrome : IframeChrome;\n\n const showLoadingIcon = !isIframeContentLoaded && iframeMode === \"embedded\";\n const [isClient, setIsClient] = useState(false);\n useEffect(() => {\n // only runs on client\n setIsClient(true);\n }, []);\n // don't render the loading icon wrapper in server-mode as the appearance changes after load\n return (\n <WrapperComponent onClose={onClose} isFrameLoaded={isIframeContentLoaded}>\n {showLoadingIcon && isClient ? (\n <div\n id=\"civic-auth-loading-icon-wrapper\"\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor,\n borderRadius: \"24px\",\n }}\n >\n <LoadingIcon />\n </div>\n ) : null}\n <CivicAuthIframe\n ref={iframeRef}\n id={\"civic-auth-iframe\"}\n onLoad={handleIframeLoad}\n />\n </WrapperComponent>\n );\n};\n\nexport type { CivicAuthIframeContainerProps };\n\nexport { CivicAuthIframeContainer };\n"]}
|
|
1
|
+
{"version":3,"file":"CivicAuthIframeContainer.js","sourceRoot":"","sources":["../../../src/shared/components/CivicAuthIframeContainer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC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KAAC,eAAe,IACd,GAAG,EAAE,SAAS,EACd,EAAE,EAAE,mBAAmB,EACvB,MAAM,EAAE,gBAAgB,GACxB,GACE,CACP,IACG,GACW,CACpB,CAAC;AACJ,CAAC,CAAC;AAIF,OAAO,EAAE,wBAAwB,EAAE,CAAC","sourcesContent":["\"use client\";\n\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { LoadingIcon } from \"@/shared/components/LoadingIcon.js\";\nimport { CloseIcon } from \"@/shared/components/CloseIcon.js\";\nimport { CivicAuthIframe } from \"@/shared/components/CivicAuthIframe.js\";\nimport { useIframe } from \"@/shared/hooks/index.js\";\nimport { TOKEN_EXCHANGE_TRIGGER_TEXT } from \"@/constants.js\";\nimport { useCivicAuthConfig } from \"@/shared/hooks/index.js\";\nimport { useClientTokenExchangeSession } from \"@/shared/hooks/index.js\";\nimport { getIframeRef } from \"../lib/iframeUtils.js\";\n\ntype CivicAuthIframeContainerProps = {\n onClose?: () => void;\n closeOnRedirect?: boolean;\n};\n\nfunction NoChrome({\n children,\n}: {\n children: React.ReactNode;\n onClose?: () => void;\n}) {\n return (\n <div data-testid=\"civic-iframe-no-chrome\" style={{ position: \"relative\" }}>\n {children}\n </div>\n );\n}\n\nexport function IframeChrome({\n children,\n onClose,\n isFrameLoaded,\n}: {\n children: React.ReactNode;\n onClose?: () => void;\n isFrameLoaded: boolean;\n}) {\n const { setIframeAborted } = useIframe();\n\n return (\n <div\n style={{\n left: 0,\n top: 0,\n zIndex: 50,\n display: \"flex\",\n height: \"100vh\",\n width: \"100vw\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"rgba(17, 24, 39, 0.5)\",\n backdropFilter: \"blur(4px)\",\n }}\n onClick={() => {\n setIframeAborted(true);\n onClose?.();\n }}\n >\n <div\n data-testid=\"iframe-chrome\"\n style={{\n position: \"relative\",\n overflow: \"hidden\",\n paddingLeft: \"0\",\n paddingRight: \"0\",\n paddingBottom: \"0\",\n boxShadow:\n \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\n width: \"20rem\",\n }}\n onClick={(e) => e.stopPropagation()}\n >\n {isFrameLoaded && (\n <button\n style={{\n position: \"absolute\",\n right: \"1rem\",\n top: \"2rem\",\n display: \"flex\",\n cursor: \"pointer\",\n alignItems: \"center\",\n justifyContent: \"center\",\n border: \"none\",\n backgroundColor: \"white\",\n padding: \"0.25rem\",\n color: \"#9ca3af\",\n }}\n onClick={() => {\n setIframeAborted(true);\n onClose?.();\n }}\n >\n <CloseIcon />\n </button>\n )}\n\n {children}\n </div>\n </div>\n );\n}\n\nconst CivicAuthIframeContainer = ({\n onClose,\n closeOnRedirect = true,\n}: CivicAuthIframeContainerProps) => {\n const config = useCivicAuthConfig();\n const [tokenExchangeUrl, setTokenExchangeUrl] = useState<string | null>(null);\n const { doTokenExchange } = useClientTokenExchangeSession();\n const { iframeRef, iframeMode, backgroundColor, setIframeMounted } =\n useIframe();\n const [isIframeContentLoaded, setIsIframeContentLoaded] = useState(false);\n const [isClient, setIsClient] = useState(false);\n\n useEffect(() => {\n setIsClient(true);\n setIframeMounted(true);\n }, [setIframeMounted]);\n\n useEffect(() => {\n if (tokenExchangeUrl) {\n doTokenExchange?.(tokenExchangeUrl);\n }\n }, [doTokenExchange, tokenExchangeUrl]);\n\n const processIframeUrl = useCallback(() => {\n if (!config) return;\n if (iframeRef && iframeRef.current) {\n const ref = getIframeRef(iframeRef.current)!;\n if (ref.contentWindow) {\n try {\n const iframeUrl = ref.contentWindow.location.href;\n // we know that oauth has finished when the iframe redirects to our redirectUrl\n if (iframeUrl.startsWith(config.redirectUrl)) {\n const iframeBody = ref.contentWindow.document.body.innerHTML;\n\n // If we're doing a server token exchange, we need to call the server a second time\n // using a fetch so that we're on the same domain and cookies can be sent and read\n // The server will use the presence of the code_verifier cookie to determine whether to do a token exchange or not.\n // On the initial (3rd party) redirect from the auth server, the cookie won't be sent, so the server-side callback route will just render a blank page,\n // and we'll do the exchange request from here, which will include the cookies.\n if (iframeBody.includes(TOKEN_EXCHANGE_TRIGGER_TEXT)) {\n const params = new URL(iframeUrl).searchParams;\n const appUrl = globalThis.window?.location?.origin;\n fetch(\n `${config.redirectUrl}?${params.toString()}&appUrl=${appUrl}`,\n );\n } else {\n // if we're doing token-exchange in the client, we can just set the authResponseUrl\n // to be handled by the auth provider\n // iframeRef.current.setAttribute(\"src\", \"\");\n setTokenExchangeUrl(iframeUrl);\n }\n\n if (closeOnRedirect) onClose?.();\n return true; // Successfully processed the URL\n }\n } catch {\n // ignore errors while waiting for redirect\n }\n }\n }\n return false; // Haven't processed the URL yet\n }, [closeOnRedirect, config, iframeRef, onClose]);\n\n const intervalId = useRef<NodeJS.Timeout>();\n\n const handleEscape = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n onClose?.();\n }\n },\n [onClose],\n );\n\n // handle Escape\n useEffect(() => {\n window.addEventListener(\"keydown\", handleEscape);\n\n return () => window.removeEventListener(\"keydown\", handleEscape);\n });\n\n const handleIframeLoad = useCallback(() => {\n setIsIframeContentLoaded(true);\n\n const iframeHasUrl = processIframeUrl();\n if (iframeHasUrl && intervalId.current) {\n clearInterval(intervalId.current);\n }\n }, [processIframeUrl, intervalId]);\n\n const WrapperComponent = iframeMode === \"embedded\" ? NoChrome : IframeChrome;\n\n return (\n <WrapperComponent onClose={onClose} isFrameLoaded={isIframeContentLoaded}>\n <div\n style={{\n position: \"relative\",\n height: isIframeContentLoaded ? \"auto\" : \"225px\",\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"center\",\n backgroundColor: isClient ? backgroundColor : \"#8E949D\",\n borderRadius: \"24px\",\n width: \"100%\",\n transition: \"all 0.5s ease-in-out\",\n }}\n >\n <div\n id=\"civic-auth-loading-icon-wrapper\"\n style={{\n position: \"absolute\",\n inset: 0,\n display: isIframeContentLoaded ? \"none\" : \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: isClient ? backgroundColor : \"#8E949D\",\n borderRadius: \"24px\",\n height: \"225px\",\n width: \"100%\",\n transition: \"all 0.5s ease-in-out\",\n }}\n >\n <LoadingIcon />\n </div>\n {isClient && (\n <div\n style={{\n visibility: isIframeContentLoaded ? \"visible\" : \"hidden\",\n display: \"flex\",\n height: \"100%\",\n width: \"100%\",\n minWidth: \"100%\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: \"24px\",\n overflow: \"hidden\",\n backgroundColor,\n transition: \"all 0.5s ease-in-out\",\n }}\n >\n <CivicAuthIframe\n ref={iframeRef}\n id={\"civic-auth-iframe\"}\n onLoad={handleIframeLoad}\n />\n </div>\n )}\n </div>\n </WrapperComponent>\n );\n};\n\nexport type { CivicAuthIframeContainerProps };\n\nexport { CivicAuthIframeContainer };\n"]}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
type LoadingIconProps = {
|
|
3
|
+
width?: string;
|
|
4
|
+
height?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
};
|
|
7
|
+
declare const LoadingIcon: ({ width, height, style, }: LoadingIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
8
|
export { LoadingIcon };
|
|
6
9
|
//# sourceMappingURL=LoadingIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingIcon.d.ts","sourceRoot":"","sources":["../../../src/shared/components/LoadingIcon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoadingIcon.d.ts","sourceRoot":"","sources":["../../../src/shared/components/LoadingIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,QAAA,MAAM,WAAW,GAAI,2BAIlB,gBAAgB,qDAkDlB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
-
const LoadingIcon = ({ width = "2em", height = "2em" }) => (_jsxs("div", { id: "civic-auth-loading-icon", role: "status", children: [_jsx("style", { children: `
|
|
3
|
+
const LoadingIcon = ({ width = "2em", height = "2em", style = {}, }) => (_jsxs("div", { id: "civic-auth-loading-icon", role: "status", children: [_jsx("style", { children: `
|
|
4
4
|
@keyframes spin {
|
|
5
5
|
0% { transform: rotate(0deg); }
|
|
6
6
|
100% { transform: rotate(360deg); }
|
|
@@ -12,7 +12,8 @@ const LoadingIcon = ({ width = "2em", height = "2em" }) => (_jsxs("div", { id: "
|
|
|
12
12
|
animation: "spin 1s linear infinite",
|
|
13
13
|
fill: "#4b5563",
|
|
14
14
|
color: "#e5e7eb",
|
|
15
|
-
|
|
15
|
+
...style,
|
|
16
|
+
}, viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z", fill: "currentColor" }), _jsx("path", { d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z", fill: "currentFill", opacity: "0.7" })] }), _jsx("span", { style: {
|
|
16
17
|
position: "absolute",
|
|
17
18
|
width: "1px",
|
|
18
19
|
height: "1px",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingIcon.js","sourceRoot":"","sources":["../../../src/shared/components/LoadingIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LoadingIcon.js","sourceRoot":"","sources":["../../../src/shared/components/LoadingIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,WAAW,GAAG,CAAC,EACnB,KAAK,GAAG,KAAK,EACb,MAAM,GAAG,KAAK,EACd,KAAK,GAAG,EAAE,GACO,EAAE,EAAE,CAAC,CACtB,eAAK,EAAE,EAAC,yBAAyB,EAAC,IAAI,EAAC,QAAQ,aAC7C,0BACG;;;;;OAKA,GACK,EACR,8BACc,MAAM,EAClB,KAAK,EAAE;gBACL,OAAO,EAAE,QAAQ;gBACjB,KAAK;gBACL,MAAM;gBACN,SAAS,EAAE,yBAAyB;gBACpC,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;gBAChB,GAAG,KAAK;aACT,EACD,OAAO,EAAC,aAAa,EACrB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,eACE,CAAC,EAAC,8WAA8W,EAChX,IAAI,EAAC,cAAc,GACnB,EACF,eACE,CAAC,EAAC,+kBAA+kB,EACjlB,IAAI,EAAC,aAAa,EAClB,OAAO,EAAC,KAAK,GACb,IACE,EACN,eACE,KAAK,EAAE;gBACL,QAAQ,EAAE,UAAU;gBACpB,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE,CAAC;gBACV,MAAM,EAAE,MAAM;gBACd,QAAQ,EAAE,QAAQ;gBAClB,IAAI,EAAE,kBAAkB;gBACxB,MAAM,EAAE,CAAC;aACV,2BAGI,IACH,CACP,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import React from \"react\";\n\ntype LoadingIconProps = {\n width?: string;\n height?: string;\n style?: React.CSSProperties;\n};\n\nconst LoadingIcon = ({\n width = \"2em\",\n height = \"2em\",\n style = {},\n}: LoadingIconProps) => (\n <div id=\"civic-auth-loading-icon\" role=\"status\">\n <style>\n {`\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n `}\n </style>\n <svg\n aria-hidden=\"true\"\n style={{\n display: \"inline\",\n width,\n height,\n animation: \"spin 1s linear infinite\",\n fill: \"#4b5563\",\n color: \"#e5e7eb\",\n ...style,\n }}\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n opacity=\"0.7\"\n />\n </svg>\n <span\n style={{\n position: \"absolute\",\n width: \"1px\",\n height: \"1px\",\n padding: 0,\n margin: \"-1px\",\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n border: 0,\n }}\n >\n Loading...\n </span>\n </div>\n);\n\nexport { LoadingIcon };\n"]}
|
package/dist/shared/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "@civic/auth:0.4.
|
|
1
|
+
export declare const VERSION = "@civic/auth:0.4.3";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/shared/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/shared/version.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAE/C,MAAM,CAAC,MAAM,OAAO,GAAG,mBAAmB,CAAC","sourcesContent":["// This is an auto-generated file. Do not edit.\n\nexport const VERSION = \"@civic/auth:0.4.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/shared/version.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAE/C,MAAM,CAAC,MAAM,OAAO,GAAG,mBAAmB,CAAC","sourcesContent":["// This is an auto-generated file. Do not edit.\n\nexport const VERSION = \"@civic/auth:0.4.3\";\n"]}
|