@descope/react-sdk 2.29.4 → 2.30.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.
- package/dist/cjs/components/OutboundApplications.js +1 -1
- package/dist/cjs/components/OutboundApplications.js.map +1 -1
- package/dist/cjs/components/TenantProfile.js +1 -1
- package/dist/cjs/components/TenantProfile.js.map +1 -1
- package/dist/cjs/components/UserManagement.js +1 -1
- package/dist/cjs/components/UserManagement.js.map +1 -1
- package/dist/cjs/components/UserProfile.js +1 -1
- package/dist/cjs/components/UserProfile.js.map +1 -1
- package/dist/cjs/constants.js +1 -1
- package/dist/esm/components/OutboundApplications.js +1 -1
- package/dist/esm/components/OutboundApplications.js.map +1 -1
- package/dist/esm/components/TenantProfile.js +1 -1
- package/dist/esm/components/TenantProfile.js.map +1 -1
- package/dist/esm/components/UserManagement.js +1 -1
- package/dist/esm/components/UserManagement.js.map +1 -1
- package/dist/esm/components/UserProfile.js +1 -1
- package/dist/esm/components/UserProfile.js.map +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/index.d.ts +57 -15
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/types/components/AccessKeyManagement.d.ts +2 -0
- package/dist/types/components/ApplicationsPortal.d.ts +2 -0
- package/dist/types/components/AuditManagement.d.ts +2 -0
- package/dist/types/components/OutboundApplications.d.ts +2 -0
- package/dist/types/components/RoleManagement.d.ts +2 -0
- package/dist/types/components/TenantProfile.d.ts +2 -0
- package/dist/types/components/UserManagement.d.ts +2 -0
- package/dist/types/components/UserProfile.d.ts +2 -0
- package/dist/types/sdk.d.ts +117 -45
- package/dist/types/types.d.ts +2 -0
- package/package.json +13 -13
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const d=e.lazy((async()=>(await import("@descope/outbound-applications-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-outbound-applications-widget",Object.assign({ref:t},e)))))}))),o=l.default.forwardRef((({logger:r,theme:a,locale:o,debug:s,widgetId:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const d=e.lazy((async()=>(await import("@descope/outbound-applications-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-outbound-applications-widget",Object.assign({ref:t},e)))))}))),o=l.default.forwardRef((({logger:r,theme:a,locale:o,debug:s,widgetId:n,styleId:u,onReady:i,client:c,form:f},p)=>{const[b,g]=e.useState(null);e.useImperativeHandle(p,(()=>b));const{projectId:m,baseUrl:w,baseStaticUrl:y,baseCdnUrl:v,refreshCookieName:I}=l.default.useContext(t.default);return e.useEffect((()=>{const e=b;return i&&(null==e||e.addEventListener("ready",i)),()=>{i&&(null==e||e.removeEventListener("ready",i))}}),[b,i]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(d,{ref:g,projectId:m,widgetId:n,baseUrl:w,baseStaticUrl:y,baseCdnUrl:v,"theme.attr":a,"locale.attr":o,"debug.attr":s,"styleId.attr":u,"refreshCookieName.attr":I,"client.attr":c,"form.attr":f,"logger.prop":r}))}));exports.default=o;
|
|
2
2
|
//# sourceMappingURL=OutboundApplications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutboundApplications.js","sources":["../../../src/components/OutboundApplications.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { OutboundApplicationsProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst OutboundApplicationsWC = lazy(async () => {\n await import('@descope/outbound-applications-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-outbound-applications-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst OutboundApplications = React.forwardRef<\n HTMLElement,\n OutboundApplicationsProps\n>(({ logger, theme, locale, debug, widgetId, styleId, onReady
|
|
1
|
+
{"version":3,"file":"OutboundApplications.js","sources":["../../../src/components/OutboundApplications.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { OutboundApplicationsProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst OutboundApplicationsWC = lazy(async () => {\n await import('@descope/outbound-applications-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-outbound-applications-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst OutboundApplications = React.forwardRef<\n HTMLElement,\n OutboundApplicationsProps\n>(\n (\n { logger, theme, locale, debug, widgetId, styleId, onReady, client, form },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<OutboundApplicationsWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n 'client.attr': client,\n 'form.attr': form,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default OutboundApplications;\n"],"names":["OutboundApplicationsWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","OutboundApplications","logger","theme","locale","debug","widgetId","styleId","onReady","client","form","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"mOAYA,MAAMA,EAAyBC,EAAIA,MAACC,gBAC5BC,OAAO,yCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAAA,QAAsCI,cAAA,uCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAM/CK,EAAuBP,EAAKF,QAACG,YAIjC,EACIO,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,UAASC,SAAQC,QACpEb,KAEA,MAAOc,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBjB,GAAK,IAAMc,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDzB,EAAKF,QAAC4B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFIH,IAASe,SAAAA,EAAKC,iBAAiB,QAAShB,IAErC,KACDA,IAASe,SAAAA,EAAKE,oBAAoB,QAASjB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBd,EAACF,QAAAM,cAAA4B,EAAQA,SAAC,CAAAC,SAAU,MACnBjC,EAACF,QAAAM,cAAAV,EACO,CAAAS,IAAKe,EACLG,UAAWA,EACXT,SAAUA,EACVU,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcf,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EAEb,cAAeR,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const n=e.lazy((async()=>(await import("@descope/tenant-profile-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-tenant-profile-widget",Object.assign({ref:t},e)))))}))),d=l.default.forwardRef((({logger:r,theme:a,locale:d,debug:s,widgetId:o,styleId:u,tenant:f,onReady:i},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const n=e.lazy((async()=>(await import("@descope/tenant-profile-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-tenant-profile-widget",Object.assign({ref:t},e)))))}))),d=l.default.forwardRef((({logger:r,theme:a,locale:d,debug:s,widgetId:o,styleId:u,tenant:f,onReady:i,client:c,form:p},g)=>{const[m,b]=e.useState(null);e.useImperativeHandle(g,(()=>m));const{projectId:y,baseUrl:w,baseStaticUrl:I,baseCdnUrl:v,refreshCookieName:h}=l.default.useContext(t.default);return e.useEffect((()=>{const e=m;return i&&(null==e||e.addEventListener("ready",i)),()=>{i&&(null==e||e.removeEventListener("ready",i))}}),[m,i]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(n,{projectId:y,widgetId:o,baseUrl:w,baseStaticUrl:I,baseCdnUrl:v,styleId:u,tenant:f,ref:b,"theme.attr":a,"locale.attr":d,"debug.attr":s,"styleId.attr":u,"tenant.attr":f,"refreshCookieName.attr":h,"client.attr":c,"form.attr":p,"logger.prop":r}))}));exports.default=d;
|
|
2
2
|
//# sourceMappingURL=TenantProfile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantProfile.js","sources":["../../../src/components/TenantProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { TenantProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\nconst TenantProfileWC = lazy(async () => {\n await import('@descope/tenant-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-tenant-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst TenantProfile = React.forwardRef<HTMLElement, TenantProfileProps>(\n (\n {
|
|
1
|
+
{"version":3,"file":"TenantProfile.js","sources":["../../../src/components/TenantProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { TenantProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\nconst TenantProfileWC = lazy(async () => {\n await import('@descope/tenant-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-tenant-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst TenantProfile = React.forwardRef<HTMLElement, TenantProfileProps>(\n (\n {\n logger,\n theme,\n locale,\n debug,\n widgetId,\n styleId,\n tenant,\n onReady,\n client,\n form,\n },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<TenantProfileWC\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n styleId={styleId}\n tenant={tenant}\n ref={setInnerRef}\n {...{\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'tenant.attr': tenant,\n 'refreshCookieName.attr': refreshCookieName,\n 'client.attr': client,\n 'form.attr': form,\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default TenantProfile;\n"],"names":["TenantProfileWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","TenantProfile","logger","theme","locale","debug","widgetId","styleId","tenant","onReady","client","form","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"mOAWA,MAAMA,EAAkBC,EAAIA,MAACC,gBACrBC,OAAO,kCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAAA,QAA+BI,cAAA,gCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMxCK,EAAgBP,EAAKF,QAACG,YAC1B,EAEIO,SACAC,QACAC,SACAC,QACAC,WACAC,UACAC,SACAC,UACAC,SACAC,QAEFd,KAEA,MAAOe,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBlB,GAAK,IAAMe,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrD1B,EAAKF,QAAC6B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFIH,IAASe,SAAAA,EAAKC,iBAAiB,QAAShB,IAErC,KACDA,IAASe,SAAAA,EAAKE,oBAAoB,QAASjB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBf,EAACF,QAAAM,cAAA6B,EAAQA,SAAC,CAAAC,SAAU,MACnBlC,UAAAI,cAACV,EACO,CAAA4B,UAAWA,EACXV,SAAUA,EACVW,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZZ,QAASA,EACTC,OAAQA,EACRX,IAAKgB,EAEH,aAAcV,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,cAAeC,EACf,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EACb,cAAeT,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const n=e.lazy((async()=>(await import("@descope/user-management-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-user-management-widget",Object.assign({ref:t},e)))))}))),d=l.default.forwardRef((({logger:r,tenant:a,theme:d,locale:s,debug:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const n=e.lazy((async()=>(await import("@descope/user-management-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-user-management-widget",Object.assign({ref:t},e)))))}))),d=l.default.forwardRef((({logger:r,tenant:a,theme:d,locale:s,debug:o,widgetId:u,styleId:f,onReady:c,client:i,form:m},p)=>{const[g,b]=e.useState(null);e.useImperativeHandle(p,(()=>g));const{projectId:w,baseUrl:y,baseStaticUrl:v,baseCdnUrl:I,refreshCookieName:h}=l.default.useContext(t.default);return e.useEffect((()=>{const e=g;return c&&(null==e||e.addEventListener("ready",c)),()=>{c&&(null==e||e.removeEventListener("ready",c))}}),[g,c]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(n,{projectId:w,widgetId:u,tenant:a,baseUrl:y,baseStaticUrl:v,baseCdnUrl:I,ref:b,"theme.attr":d,"locale.attr":s,"debug.attr":o,"styleId.attr":f,"refreshCookieName.attr":h,"client.attr":i,"form.attr":m,"logger.prop":r}))}));exports.default=d;
|
|
2
2
|
//# sourceMappingURL=UserManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserManagement.js","sources":["../../../src/components/UserManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserManagementWC = lazy(async () => {\n await import('@descope/user-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserManagement = React.forwardRef<HTMLElement, UserManagementProps>(\n (\n {
|
|
1
|
+
{"version":3,"file":"UserManagement.js","sources":["../../../src/components/UserManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserManagementWC = lazy(async () => {\n await import('@descope/user-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserManagement = React.forwardRef<HTMLElement, UserManagementProps>(\n (\n {\n logger,\n tenant,\n theme,\n locale,\n debug,\n widgetId,\n styleId,\n onReady,\n client,\n form,\n },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<UserManagementWC\n projectId={projectId}\n widgetId={widgetId}\n tenant={tenant}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n ref={setInnerRef}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n 'client.attr': client,\n 'form.attr': form,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default UserManagement;\n"],"names":["UserManagementWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","UserManagement","logger","tenant","theme","locale","debug","widgetId","styleId","onReady","client","form","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"mOAYA,MAAMA,EAAmBC,EAAIA,MAACC,gBACtBC,OAAO,mCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAAA,QAAgCI,cAAA,iCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMzCK,EAAiBP,EAAKF,QAACG,YAC3B,EAEIO,SACAC,SACAC,QACAC,SACAC,QACAC,WACAC,UACAC,UACAC,SACAC,QAEFd,KAEA,MAAOe,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBlB,GAAK,IAAMe,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrD1B,EAAKF,QAAC6B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFIH,IAASe,SAAAA,EAAKC,iBAAiB,QAAShB,IAErC,KACDA,IAASe,SAAAA,EAAKE,oBAAoB,QAASjB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBf,EAACF,QAAAM,cAAA6B,EAAQA,SAAC,CAAAC,SAAU,MACnBlC,EAAAF,QAAAM,cAACV,EAAgB,CACT4B,UAAWA,EACXT,SAAUA,EACVJ,OAAQA,EACRc,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZtB,IAAKgB,EAGH,aAAcT,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EAEb,cAAeT,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const s=e.lazy((async()=>(await import("@descope/user-profile-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-user-profile-widget",Object.assign({ref:t},e)))))}))),o=l.default.forwardRef((({logger:r,theme:a,locale:o,debug:d,widgetId:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const s=e.lazy((async()=>(await import("@descope/user-profile-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-user-profile-widget",Object.assign({ref:t},e)))))}))),o=l.default.forwardRef((({logger:r,theme:a,locale:o,debug:d,widgetId:n,onLogout:u,styleId:i,onReady:f,client:c,form:p},g)=>{const[m,b]=e.useState(null);e.useImperativeHandle(g,(()=>m));const{projectId:v,baseUrl:y,baseStaticUrl:E,baseCdnUrl:I,refreshCookieName:w,setSession:h,setUser:C,setIsAuthenticated:U}=l.default.useContext(t.default),j=e.useCallback((e=>{u&&u(e),U(!1),h(""),C(null)}),[u,h,U,C]);return e.useEffect((()=>{if(m)return m.addEventListener("logout",j),()=>m.removeEventListener("logout",j)}),[m,j]),e.useEffect((()=>{const e=m;return f&&(null==e||e.addEventListener("ready",f)),()=>{f&&(null==e||e.removeEventListener("ready",f))}}),[m,f]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(s,{projectId:v,widgetId:n,baseUrl:y,baseStaticUrl:E,baseCdnUrl:I,styleId:i,ref:b,"theme.attr":a,"locale.attr":o,"debug.attr":d,"styleId.attr":i,"refreshCookieName.attr":w,"client.attr":c,"form.attr":p,"logger.prop":r}))}));exports.default=o;
|
|
2
2
|
//# sourceMappingURL=UserProfile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserProfile.js","sources":["../../../src/components/UserProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useImperativeHandle,\n useState,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserProfileWC = lazy(async () => {\n await import('@descope/user-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserProfile = React.forwardRef<HTMLElement, UserProfileProps>(\n (\n {
|
|
1
|
+
{"version":3,"file":"UserProfile.js","sources":["../../../src/components/UserProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useImperativeHandle,\n useState,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserProfileWC = lazy(async () => {\n await import('@descope/user-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserProfile = React.forwardRef<HTMLElement, UserProfileProps>(\n (\n {\n logger,\n theme,\n locale,\n debug,\n widgetId,\n onLogout,\n styleId,\n onReady,\n client,\n form,\n },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const {\n projectId,\n baseUrl,\n baseStaticUrl,\n baseCdnUrl,\n refreshCookieName,\n setSession,\n setUser,\n setIsAuthenticated,\n } = React.useContext(Context);\n\n const handleLogout = useCallback(\n (e: CustomEvent) => {\n if (onLogout) {\n onLogout(e);\n }\n // we want to clear the session and user when the logout event is triggered\n setIsAuthenticated(false);\n setSession('');\n setUser(null);\n },\n [onLogout, setSession, setIsAuthenticated, setUser],\n );\n\n useEffect(() => {\n if (innerRef) {\n innerRef.addEventListener('logout', handleLogout);\n return () => innerRef.removeEventListener('logout', handleLogout);\n }\n return undefined;\n }, [innerRef, handleLogout]);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<UserProfileWC\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n styleId={styleId}\n ref={setInnerRef}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n 'client.attr': client,\n 'form.attr': form,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default UserProfile;\n"],"names":["UserProfileWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","UserProfile","logger","theme","locale","debug","widgetId","onLogout","styleId","onReady","client","form","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","setSession","setUser","setIsAuthenticated","useContext","Context","handleLogout","useCallback","e","useEffect","addEventListener","removeEventListener","ele","Suspense","fallback"],"mappings":"mOAaA,MAAMA,EAAgBC,EAAIA,MAACC,gBACnBC,OAAO,gCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAAA,QAA6BI,cAAA,8BAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMtCK,EAAcP,EAAKF,QAACG,YACxB,EAEIO,SACAC,QACAC,SACAC,QACAC,WACAC,WACAC,UACAC,UACAC,SACAC,QAEFd,KAEA,MAAOe,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBlB,GAAK,IAAMe,IAE/B,MAAMI,UACJA,EAASC,QACTA,EAAOC,cACPA,EAAaC,WACbA,EAAUC,kBACVA,EAAiBC,WACjBA,EAAUC,QACVA,EAAOC,mBACPA,GACE7B,EAAKF,QAACgC,WAAWC,EAAOjC,SAEtBkC,EAAeC,eAClBC,IACKrB,GACFA,EAASqB,GAGXL,GAAmB,GACnBF,EAAW,IACXC,EAAQ,KAAK,GAEf,CAACf,EAAUc,EAAYE,EAAoBD,IAoB7C,OAjBAO,EAAAA,WAAU,KACR,GAAIjB,EAEF,OADAA,EAASkB,iBAAiB,SAAUJ,GAC7B,IAAMd,EAASmB,oBAAoB,SAAUL,EAEtC,GACf,CAACd,EAAUc,IAEdG,EAAAA,WAAU,KACR,MAAMG,EAAMpB,EAGZ,OAFIH,IAASuB,SAAAA,EAAKF,iBAAiB,QAASrB,IAErC,KACDA,IAASuB,SAAAA,EAAKD,oBAAoB,QAAStB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBf,EAACF,QAAAM,cAAAmC,EAAQA,SAAC,CAAAC,SAAU,MACnBxC,EAAAF,QAAAM,cAACV,EAAa,CACN4B,UAAWA,EACXV,SAAUA,EACVW,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZX,QAASA,EACTX,IAAKgB,EAGH,aAAcV,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBG,EAChB,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EAEb,cAAeT,IAIrB"}
|
package/dist/cjs/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e="undefined"!=typeof window;exports.IS_BROWSER=e,exports.baseHeaders={"x-descope-sdk-name":"react","x-descope-sdk-version":"2.
|
|
1
|
+
"use strict";const e="undefined"!=typeof window;exports.IS_BROWSER=e,exports.baseHeaders={"x-descope-sdk-name":"react","x-descope-sdk-version":"2.30.0"};
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as o,Suspense as l}from"react";import n from"../hooks/Context.js";import s from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/outbound-applications-widget"),{default:s(e.forwardRef(((t,r)=>e.createElement("descope-outbound-applications-widget",Object.assign({ref:r},t)))))}))),i=e.forwardRef((({logger:t,theme:s,locale:i,debug:c,widgetId:p,styleId:m,onReady:u},
|
|
1
|
+
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as o,Suspense as l}from"react";import n from"../hooks/Context.js";import s from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/outbound-applications-widget"),{default:s(e.forwardRef(((t,r)=>e.createElement("descope-outbound-applications-widget",Object.assign({ref:r},t)))))}))),i=e.forwardRef((({logger:t,theme:s,locale:i,debug:c,widgetId:p,styleId:m,onReady:f,client:u,form:b},g)=>{const[w,h]=r(null);a(g,(()=>w));const{projectId:y,baseUrl:C,baseStaticUrl:I,baseCdnUrl:U,refreshCookieName:j}=e.useContext(n);return o((()=>{const e=w;return f&&(null==e||e.addEventListener("ready",f)),()=>{f&&(null==e||e.removeEventListener("ready",f))}}),[w,f]),e.createElement(l,{fallback:null},e.createElement(d,{ref:h,projectId:y,widgetId:p,baseUrl:C,baseStaticUrl:I,baseCdnUrl:U,"theme.attr":s,"locale.attr":i,"debug.attr":c,"styleId.attr":m,"refreshCookieName.attr":j,"client.attr":u,"form.attr":b,"logger.prop":t}))}));export{i as default};
|
|
2
2
|
//# sourceMappingURL=OutboundApplications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutboundApplications.js","sources":["../../../src/components/OutboundApplications.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { OutboundApplicationsProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst OutboundApplicationsWC = lazy(async () => {\n await import('@descope/outbound-applications-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-outbound-applications-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst OutboundApplications = React.forwardRef<\n HTMLElement,\n OutboundApplicationsProps\n>(({ logger, theme, locale, debug, widgetId, styleId, onReady
|
|
1
|
+
{"version":3,"file":"OutboundApplications.js","sources":["../../../src/components/OutboundApplications.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { OutboundApplicationsProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst OutboundApplicationsWC = lazy(async () => {\n await import('@descope/outbound-applications-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-outbound-applications-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst OutboundApplications = React.forwardRef<\n HTMLElement,\n OutboundApplicationsProps\n>(\n (\n { logger, theme, locale, debug, widgetId, styleId, onReady, client, form },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<OutboundApplicationsWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n 'client.attr': client,\n 'form.attr': form,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default OutboundApplications;\n"],"names":["OutboundApplicationsWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","OutboundApplications","logger","theme","locale","debug","widgetId","styleId","onReady","client","form","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"kLAYA,MAAMA,EAAyBC,GAAKC,gBAC5BC,OAAO,yCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAsCI,cAAA,uCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAM/CK,EAAuBP,EAAMC,YAIjC,EACIO,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,UAASC,SAAQC,QACpEb,KAEA,MAAOc,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBjB,GAAK,IAAMc,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDzB,EAAM0B,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFIH,IAASe,SAAAA,EAAKC,iBAAiB,QAAShB,IAErC,KACDA,IAASe,SAAAA,EAAKE,oBAAoB,QAASjB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBd,EAACI,cAAA4B,EAAS,CAAAC,SAAU,MACnBjC,EAACI,cAAAV,EACO,CAAAS,IAAKe,EACLG,UAAWA,EACXT,SAAUA,EACVU,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcf,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EAEb,cAAeR,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as n,Suspense as o}from"react";import l from"../hooks/Context.js";import s from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/tenant-profile-widget"),{default:s(e.forwardRef(((t,r)=>e.createElement("descope-tenant-profile-widget",Object.assign({ref:r},t)))))}))),i=e.forwardRef((({logger:t,theme:s,locale:i,debug:c,widgetId:f,styleId:
|
|
1
|
+
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as n,Suspense as o}from"react";import l from"../hooks/Context.js";import s from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/tenant-profile-widget"),{default:s(e.forwardRef(((t,r)=>e.createElement("descope-tenant-profile-widget",Object.assign({ref:r},t)))))}))),i=e.forwardRef((({logger:t,theme:s,locale:i,debug:c,widgetId:f,styleId:m,tenant:p,onReady:g,client:u,form:b},w)=>{const[y,I]=r(null);a(w,(()=>y));const{projectId:h,baseUrl:C,baseStaticUrl:U,baseCdnUrl:j,refreshCookieName:E}=e.useContext(l);return n((()=>{const e=y;return g&&(null==e||e.addEventListener("ready",g)),()=>{g&&(null==e||e.removeEventListener("ready",g))}}),[y,g]),e.createElement(o,{fallback:null},e.createElement(d,{projectId:h,widgetId:f,baseUrl:C,baseStaticUrl:U,baseCdnUrl:j,styleId:m,tenant:p,ref:I,"theme.attr":s,"locale.attr":i,"debug.attr":c,"styleId.attr":m,"tenant.attr":p,"refreshCookieName.attr":E,"client.attr":u,"form.attr":b,"logger.prop":t}))}));export{i as default};
|
|
2
2
|
//# sourceMappingURL=TenantProfile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantProfile.js","sources":["../../../src/components/TenantProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { TenantProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\nconst TenantProfileWC = lazy(async () => {\n await import('@descope/tenant-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-tenant-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst TenantProfile = React.forwardRef<HTMLElement, TenantProfileProps>(\n (\n {
|
|
1
|
+
{"version":3,"file":"TenantProfile.js","sources":["../../../src/components/TenantProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { TenantProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\nconst TenantProfileWC = lazy(async () => {\n await import('@descope/tenant-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-tenant-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst TenantProfile = React.forwardRef<HTMLElement, TenantProfileProps>(\n (\n {\n logger,\n theme,\n locale,\n debug,\n widgetId,\n styleId,\n tenant,\n onReady,\n client,\n form,\n },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<TenantProfileWC\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n styleId={styleId}\n tenant={tenant}\n ref={setInnerRef}\n {...{\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'tenant.attr': tenant,\n 'refreshCookieName.attr': refreshCookieName,\n 'client.attr': client,\n 'form.attr': form,\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default TenantProfile;\n"],"names":["TenantProfileWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","TenantProfile","logger","theme","locale","debug","widgetId","styleId","tenant","onReady","client","form","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"kLAWA,MAAMA,EAAkBC,GAAKC,gBACrBC,OAAO,kCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAA+BI,cAAA,gCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMxCK,EAAgBP,EAAMC,YAC1B,EAEIO,SACAC,QACAC,SACAC,QACAC,WACAC,UACAC,SACAC,UACAC,SACAC,QAEFd,KAEA,MAAOe,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBlB,GAAK,IAAMe,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrD1B,EAAM2B,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFIH,IAASe,SAAAA,EAAKC,iBAAiB,QAAShB,IAErC,KACDA,IAASe,SAAAA,EAAKE,oBAAoB,QAASjB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBf,EAACI,cAAA6B,EAAS,CAAAC,SAAU,MACnBlC,EAAAI,cAACV,EACO,CAAA4B,UAAWA,EACXV,SAAUA,EACVW,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZZ,QAASA,EACTC,OAAQA,EACRX,IAAKgB,EAEH,aAAcV,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,cAAeC,EACf,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EACb,cAAeT,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as n,Suspense as o}from"react";import l from"../hooks/Context.js";import s from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/user-management-widget"),{default:s(e.forwardRef(((t,r)=>e.createElement("descope-user-management-widget",Object.assign({ref:r},t)))))}))),c=e.forwardRef((({logger:t,tenant:s,theme:c,locale:i,debug:m,widgetId:f,styleId:g,onReady:p},
|
|
1
|
+
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as n,Suspense as o}from"react";import l from"../hooks/Context.js";import s from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/user-management-widget"),{default:s(e.forwardRef(((t,r)=>e.createElement("descope-user-management-widget",Object.assign({ref:r},t)))))}))),c=e.forwardRef((({logger:t,tenant:s,theme:c,locale:i,debug:m,widgetId:f,styleId:g,onReady:p,client:u,form:b},w)=>{const[h,y]=r(null);a(w,(()=>h));const{projectId:C,baseUrl:I,baseStaticUrl:U,baseCdnUrl:j,refreshCookieName:E}=e.useContext(l);return n((()=>{const e=h;return p&&(null==e||e.addEventListener("ready",p)),()=>{p&&(null==e||e.removeEventListener("ready",p))}}),[h,p]),e.createElement(o,{fallback:null},e.createElement(d,{projectId:C,widgetId:f,tenant:s,baseUrl:I,baseStaticUrl:U,baseCdnUrl:j,ref:y,"theme.attr":c,"locale.attr":i,"debug.attr":m,"styleId.attr":g,"refreshCookieName.attr":E,"client.attr":u,"form.attr":b,"logger.prop":t}))}));export{c as default};
|
|
2
2
|
//# sourceMappingURL=UserManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserManagement.js","sources":["../../../src/components/UserManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserManagementWC = lazy(async () => {\n await import('@descope/user-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserManagement = React.forwardRef<HTMLElement, UserManagementProps>(\n (\n {
|
|
1
|
+
{"version":3,"file":"UserManagement.js","sources":["../../../src/components/UserManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserManagementWC = lazy(async () => {\n await import('@descope/user-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserManagement = React.forwardRef<HTMLElement, UserManagementProps>(\n (\n {\n logger,\n tenant,\n theme,\n locale,\n debug,\n widgetId,\n styleId,\n onReady,\n client,\n form,\n },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<UserManagementWC\n projectId={projectId}\n widgetId={widgetId}\n tenant={tenant}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n ref={setInnerRef}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n 'client.attr': client,\n 'form.attr': form,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default UserManagement;\n"],"names":["UserManagementWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","UserManagement","logger","tenant","theme","locale","debug","widgetId","styleId","onReady","client","form","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"kLAYA,MAAMA,EAAmBC,GAAKC,gBACtBC,OAAO,mCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAgCI,cAAA,iCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMzCK,EAAiBP,EAAMC,YAC3B,EAEIO,SACAC,SACAC,QACAC,SACAC,QACAC,WACAC,UACAC,UACAC,SACAC,QAEFd,KAEA,MAAOe,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBlB,GAAK,IAAMe,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrD1B,EAAM2B,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFIH,IAASe,SAAAA,EAAKC,iBAAiB,QAAShB,IAErC,KACDA,IAASe,SAAAA,EAAKE,oBAAoB,QAASjB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBf,EAACI,cAAA6B,EAAS,CAAAC,SAAU,MACnBlC,EAAAI,cAACV,EAAgB,CACT4B,UAAWA,EACXT,SAAUA,EACVJ,OAAQA,EACRc,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZtB,IAAKgB,EAGH,aAAcT,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EAEb,cAAeT,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{lazy as t,useState as r,useImperativeHandle as o,useCallback as a,useEffect as s,Suspense as l}from"react";import n from"../hooks/Context.js";import d from"./withPropsMapping/index.js";const i=t((async()=>(await import("@descope/user-profile-widget"),{default:d(e.forwardRef(((t,r)=>e.createElement("descope-user-profile-widget",Object.assign({ref:r},t)))))}))),c=e.forwardRef((({logger:t,theme:d,locale:c,debug:
|
|
1
|
+
import e,{lazy as t,useState as r,useImperativeHandle as o,useCallback as a,useEffect as s,Suspense as l}from"react";import n from"../hooks/Context.js";import d from"./withPropsMapping/index.js";const i=t((async()=>(await import("@descope/user-profile-widget"),{default:d(e.forwardRef(((t,r)=>e.createElement("descope-user-profile-widget",Object.assign({ref:r},t)))))}))),c=e.forwardRef((({logger:t,theme:d,locale:c,debug:f,widgetId:u,onLogout:m,styleId:p,onReady:g,client:b,form:w},I)=>{const[h,y]=r(null);o(I,(()=>h));const{projectId:E,baseUrl:U,baseStaticUrl:v,baseCdnUrl:C,refreshCookieName:j,setSession:L,setUser:k,setIsAuthenticated:x}=e.useContext(n),R=a((e=>{m&&m(e),x(!1),L(""),k(null)}),[m,L,x,k]);return s((()=>{if(h)return h.addEventListener("logout",R),()=>h.removeEventListener("logout",R)}),[h,R]),s((()=>{const e=h;return g&&(null==e||e.addEventListener("ready",g)),()=>{g&&(null==e||e.removeEventListener("ready",g))}}),[h,g]),e.createElement(l,{fallback:null},e.createElement(i,{projectId:E,widgetId:u,baseUrl:U,baseStaticUrl:v,baseCdnUrl:C,styleId:p,ref:y,"theme.attr":d,"locale.attr":c,"debug.attr":f,"styleId.attr":p,"refreshCookieName.attr":j,"client.attr":b,"form.attr":w,"logger.prop":t}))}));export{c as default};
|
|
2
2
|
//# sourceMappingURL=UserProfile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserProfile.js","sources":["../../../src/components/UserProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useImperativeHandle,\n useState,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserProfileWC = lazy(async () => {\n await import('@descope/user-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserProfile = React.forwardRef<HTMLElement, UserProfileProps>(\n (\n {
|
|
1
|
+
{"version":3,"file":"UserProfile.js","sources":["../../../src/components/UserProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useImperativeHandle,\n useState,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserProfileWC = lazy(async () => {\n await import('@descope/user-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserProfile = React.forwardRef<HTMLElement, UserProfileProps>(\n (\n {\n logger,\n theme,\n locale,\n debug,\n widgetId,\n onLogout,\n styleId,\n onReady,\n client,\n form,\n },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const {\n projectId,\n baseUrl,\n baseStaticUrl,\n baseCdnUrl,\n refreshCookieName,\n setSession,\n setUser,\n setIsAuthenticated,\n } = React.useContext(Context);\n\n const handleLogout = useCallback(\n (e: CustomEvent) => {\n if (onLogout) {\n onLogout(e);\n }\n // we want to clear the session and user when the logout event is triggered\n setIsAuthenticated(false);\n setSession('');\n setUser(null);\n },\n [onLogout, setSession, setIsAuthenticated, setUser],\n );\n\n useEffect(() => {\n if (innerRef) {\n innerRef.addEventListener('logout', handleLogout);\n return () => innerRef.removeEventListener('logout', handleLogout);\n }\n return undefined;\n }, [innerRef, handleLogout]);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<UserProfileWC\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n styleId={styleId}\n ref={setInnerRef}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n 'client.attr': client,\n 'form.attr': form,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default UserProfile;\n"],"names":["UserProfileWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","UserProfile","logger","theme","locale","debug","widgetId","onLogout","styleId","onReady","client","form","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","setSession","setUser","setIsAuthenticated","useContext","Context","handleLogout","useCallback","e","useEffect","addEventListener","removeEventListener","ele","Suspense","fallback"],"mappings":"mMAaA,MAAMA,EAAgBC,GAAKC,gBACnBC,OAAO,gCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAA6BI,cAAA,8BAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMtCK,EAAcP,EAAMC,YACxB,EAEIO,SACAC,QACAC,SACAC,QACAC,WACAC,WACAC,UACAC,UACAC,SACAC,QAEFd,KAEA,MAAOe,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBlB,GAAK,IAAMe,IAE/B,MAAMI,UACJA,EAASC,QACTA,EAAOC,cACPA,EAAaC,WACbA,EAAUC,kBACVA,EAAiBC,WACjBA,EAAUC,QACVA,EAAOC,mBACPA,GACE7B,EAAM8B,WAAWC,GAEfC,EAAeC,GAClBC,IACKrB,GACFA,EAASqB,GAGXL,GAAmB,GACnBF,EAAW,IACXC,EAAQ,KAAK,GAEf,CAACf,EAAUc,EAAYE,EAAoBD,IAoB7C,OAjBAO,GAAU,KACR,GAAIjB,EAEF,OADAA,EAASkB,iBAAiB,SAAUJ,GAC7B,IAAMd,EAASmB,oBAAoB,SAAUL,EAEtC,GACf,CAACd,EAAUc,IAEdG,GAAU,KACR,MAAMG,EAAMpB,EAGZ,OAFIH,IAASuB,SAAAA,EAAKF,iBAAiB,QAASrB,IAErC,KACDA,IAASuB,SAAAA,EAAKD,oBAAoB,QAAStB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBf,EAACI,cAAAmC,EAAS,CAAAC,SAAU,MACnBxC,EAAAI,cAACV,EAAa,CACN4B,UAAWA,EACXV,SAAUA,EACVW,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZX,QAASA,EACTX,IAAKgB,EAGH,aAAcV,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBG,EAChB,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EAEb,cAAeT,IAIrB"}
|
package/dist/esm/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e={"x-descope-sdk-name":"react","x-descope-sdk-version":"2.
|
|
1
|
+
const e={"x-descope-sdk-name":"react","x-descope-sdk-version":"2.30.0"},d="undefined"!=typeof window;export{d as IS_BROWSER,e as baseHeaders};
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ declare const createSdkWrapper: <P extends {
|
|
|
77
77
|
webAuthnSupport?: boolean;
|
|
78
78
|
};
|
|
79
79
|
lastAuth?: {
|
|
80
|
-
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
80
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "sso" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
81
81
|
oauthProvider?: string;
|
|
82
82
|
name?: string;
|
|
83
83
|
loginId?: string;
|
|
@@ -114,7 +114,7 @@ declare const createSdkWrapper: <P extends {
|
|
|
114
114
|
outboundAppScopes?: string[];
|
|
115
115
|
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "wsfedIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
116
116
|
lastAuth?: Omit<{
|
|
117
|
-
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
117
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "sso" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
118
118
|
oauthProvider?: string;
|
|
119
119
|
name?: string;
|
|
120
120
|
loginId?: string;
|
|
@@ -150,13 +150,17 @@ declare const createSdkWrapper: <P extends {
|
|
|
150
150
|
create: boolean;
|
|
151
151
|
}>>;
|
|
152
152
|
};
|
|
153
|
-
update: ((identifier: string, token?: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<_1.ResponseData
|
|
154
|
-
|
|
153
|
+
update: ((identifier: string, token?: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<_1.ResponseData> | _1.SdkResponse<{
|
|
154
|
+
jwt?: _1.JWTResponse;
|
|
155
|
+
}>>) & {
|
|
156
|
+
start: (loginId: string, origin: string, token?: string, passkeyOptions?: _1.PasskeyOptions, mfa?: boolean) => Promise<_1.SdkResponse<{
|
|
155
157
|
transactionId: string;
|
|
156
158
|
options: string;
|
|
157
159
|
create: boolean;
|
|
158
160
|
}>>;
|
|
159
|
-
finish: (transactionId: string, response: string) => Promise<_1.SdkResponse<
|
|
161
|
+
finish: (transactionId: string, response: string) => Promise<_1.SdkResponse<{
|
|
162
|
+
jwt?: _1.JWTResponse;
|
|
163
|
+
}>>;
|
|
160
164
|
};
|
|
161
165
|
helpers: {
|
|
162
166
|
create: (options: string) => Promise<string>;
|
|
@@ -699,6 +703,10 @@ declare const createSdkWrapper: <P extends {
|
|
|
699
703
|
externalIdentifier?: string;
|
|
700
704
|
}, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
701
705
|
};
|
|
706
|
+
sso: {
|
|
707
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _1.LoginOptions, token?: string, ssoId?: string, forceAuthn?: boolean, loginHint?: string, enforceInitiatedEmail?: boolean) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
708
|
+
exchange: (code: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
709
|
+
};
|
|
702
710
|
saml: {
|
|
703
711
|
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _1.LoginOptions, token?: string, ssoId?: string, forceAuthn?: boolean, loginHint?: string, enforceInitiatedEmail?: boolean) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
704
712
|
exchange: (code: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
@@ -831,7 +839,7 @@ declare const createSdkWrapper: <P extends {
|
|
|
831
839
|
webAuthnSupport?: boolean;
|
|
832
840
|
};
|
|
833
841
|
lastAuth?: {
|
|
834
|
-
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
842
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "sso" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
835
843
|
oauthProvider?: string;
|
|
836
844
|
name?: string;
|
|
837
845
|
loginId?: string;
|
|
@@ -868,7 +876,7 @@ declare const createSdkWrapper: <P extends {
|
|
|
868
876
|
outboundAppScopes?: string[];
|
|
869
877
|
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "wsfedIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
870
878
|
lastAuth?: Omit<{
|
|
871
|
-
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
879
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "sso" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
872
880
|
oauthProvider?: string;
|
|
873
881
|
name?: string;
|
|
874
882
|
loginId?: string;
|
|
@@ -904,13 +912,17 @@ declare const createSdkWrapper: <P extends {
|
|
|
904
912
|
create: boolean;
|
|
905
913
|
}>>;
|
|
906
914
|
};
|
|
907
|
-
update: ((identifier: string, token?: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<_1.ResponseData
|
|
908
|
-
|
|
915
|
+
update: ((identifier: string, token?: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<_1.ResponseData> | _1.SdkResponse<{
|
|
916
|
+
jwt?: _1.JWTResponse;
|
|
917
|
+
}>>) & {
|
|
918
|
+
start: (loginId: string, origin: string, token?: string, passkeyOptions?: _1.PasskeyOptions, mfa?: boolean) => Promise<_1.SdkResponse<{
|
|
909
919
|
transactionId: string;
|
|
910
920
|
options: string;
|
|
911
921
|
create: boolean;
|
|
912
922
|
}>>;
|
|
913
|
-
finish: (transactionId: string, response: string) => Promise<_1.SdkResponse<
|
|
923
|
+
finish: (transactionId: string, response: string) => Promise<_1.SdkResponse<{
|
|
924
|
+
jwt?: _1.JWTResponse;
|
|
925
|
+
}>>;
|
|
914
926
|
};
|
|
915
927
|
helpers: {
|
|
916
928
|
create: (options: string) => Promise<string>;
|
|
@@ -1453,6 +1465,10 @@ declare const createSdkWrapper: <P extends {
|
|
|
1453
1465
|
externalIdentifier?: string;
|
|
1454
1466
|
}, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1455
1467
|
};
|
|
1468
|
+
sso: {
|
|
1469
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _1.LoginOptions, token?: string, ssoId?: string, forceAuthn?: boolean, loginHint?: string, enforceInitiatedEmail?: boolean) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1470
|
+
exchange: (code: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1471
|
+
};
|
|
1456
1472
|
saml: {
|
|
1457
1473
|
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _1.LoginOptions, token?: string, ssoId?: string, forceAuthn?: boolean, loginHint?: string, enforceInitiatedEmail?: boolean) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1458
1474
|
exchange: (code: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
@@ -1585,7 +1601,7 @@ declare const createSdkWrapper: <P extends {
|
|
|
1585
1601
|
webAuthnSupport?: boolean;
|
|
1586
1602
|
};
|
|
1587
1603
|
lastAuth?: {
|
|
1588
|
-
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
1604
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "sso" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
1589
1605
|
oauthProvider?: string;
|
|
1590
1606
|
name?: string;
|
|
1591
1607
|
loginId?: string;
|
|
@@ -1622,7 +1638,7 @@ declare const createSdkWrapper: <P extends {
|
|
|
1622
1638
|
outboundAppScopes?: string[];
|
|
1623
1639
|
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "wsfedIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
1624
1640
|
lastAuth?: Omit<{
|
|
1625
|
-
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
1641
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "sso" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
1626
1642
|
oauthProvider?: string;
|
|
1627
1643
|
name?: string;
|
|
1628
1644
|
loginId?: string;
|
|
@@ -1658,13 +1674,17 @@ declare const createSdkWrapper: <P extends {
|
|
|
1658
1674
|
create: boolean;
|
|
1659
1675
|
}>>;
|
|
1660
1676
|
};
|
|
1661
|
-
update: ((identifier: string, token?: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<_1.ResponseData
|
|
1662
|
-
|
|
1677
|
+
update: ((identifier: string, token?: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<_1.ResponseData> | _1.SdkResponse<{
|
|
1678
|
+
jwt?: _1.JWTResponse;
|
|
1679
|
+
}>>) & {
|
|
1680
|
+
start: (loginId: string, origin: string, token?: string, passkeyOptions?: _1.PasskeyOptions, mfa?: boolean) => Promise<_1.SdkResponse<{
|
|
1663
1681
|
transactionId: string;
|
|
1664
1682
|
options: string;
|
|
1665
1683
|
create: boolean;
|
|
1666
1684
|
}>>;
|
|
1667
|
-
finish: (transactionId: string, response: string) => Promise<_1.SdkResponse<
|
|
1685
|
+
finish: (transactionId: string, response: string) => Promise<_1.SdkResponse<{
|
|
1686
|
+
jwt?: _1.JWTResponse;
|
|
1687
|
+
}>>;
|
|
1668
1688
|
};
|
|
1669
1689
|
helpers: {
|
|
1670
1690
|
create: (options: string) => Promise<string>;
|
|
@@ -2207,6 +2227,10 @@ declare const createSdkWrapper: <P extends {
|
|
|
2207
2227
|
externalIdentifier?: string;
|
|
2208
2228
|
}, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
2209
2229
|
};
|
|
2230
|
+
sso: {
|
|
2231
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _1.LoginOptions, token?: string, ssoId?: string, forceAuthn?: boolean, loginHint?: string, enforceInitiatedEmail?: boolean) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
2232
|
+
exchange: (code: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
2233
|
+
};
|
|
2210
2234
|
saml: {
|
|
2211
2235
|
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _1.LoginOptions, token?: string, ssoId?: string, forceAuthn?: boolean, loginHint?: string, enforceInitiatedEmail?: boolean) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
2212
2236
|
exchange: (code: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
@@ -2399,6 +2423,8 @@ type WidgetProps = {
|
|
|
2399
2423
|
debug?: boolean;
|
|
2400
2424
|
styleId?: string;
|
|
2401
2425
|
onReady?: CustomEventCb<{}>;
|
|
2426
|
+
form?: Record<string, any>;
|
|
2427
|
+
client?: Record<string, any>;
|
|
2402
2428
|
};
|
|
2403
2429
|
type FlowResponse = Awaited<ReturnType<Sdk['flow']['next']>>;
|
|
2404
2430
|
type ErrorResponse = Required<FlowResponse>['error'];
|
|
@@ -2498,6 +2524,8 @@ declare const AccessKeyManagement: React.ForwardRefExoticComponent<{
|
|
|
2498
2524
|
debug?: boolean;
|
|
2499
2525
|
styleId?: string;
|
|
2500
2526
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2527
|
+
form?: Record<string, any>;
|
|
2528
|
+
client?: Record<string, any>;
|
|
2501
2529
|
} & React.RefAttributes<HTMLElement>>;
|
|
2502
2530
|
|
|
2503
2531
|
declare const ApplicationsPortal: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -2509,6 +2537,8 @@ declare const ApplicationsPortal: React.ForwardRefExoticComponent<Omit<{
|
|
|
2509
2537
|
debug?: boolean;
|
|
2510
2538
|
styleId?: string;
|
|
2511
2539
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2540
|
+
form?: Record<string, any>;
|
|
2541
|
+
client?: Record<string, any>;
|
|
2512
2542
|
}, "tenant"> & {
|
|
2513
2543
|
onLogout?: (e: CustomEvent<any>) => void;
|
|
2514
2544
|
} & React.RefAttributes<HTMLElement>>;
|
|
@@ -2522,6 +2552,8 @@ declare const AuditManagement: React.ForwardRefExoticComponent<{
|
|
|
2522
2552
|
debug?: boolean;
|
|
2523
2553
|
styleId?: string;
|
|
2524
2554
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2555
|
+
form?: Record<string, any>;
|
|
2556
|
+
client?: Record<string, any>;
|
|
2525
2557
|
} & React.RefAttributes<HTMLElement>>;
|
|
2526
2558
|
|
|
2527
2559
|
declare const OutboundApplications: React.ForwardRefExoticComponent<{
|
|
@@ -2533,6 +2565,8 @@ declare const OutboundApplications: React.ForwardRefExoticComponent<{
|
|
|
2533
2565
|
debug?: boolean;
|
|
2534
2566
|
styleId?: string;
|
|
2535
2567
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2568
|
+
form?: Record<string, any>;
|
|
2569
|
+
client?: Record<string, any>;
|
|
2536
2570
|
} & React.RefAttributes<HTMLElement>>;
|
|
2537
2571
|
|
|
2538
2572
|
declare const RoleManagement: React.ForwardRefExoticComponent<{
|
|
@@ -2544,6 +2578,8 @@ declare const RoleManagement: React.ForwardRefExoticComponent<{
|
|
|
2544
2578
|
debug?: boolean;
|
|
2545
2579
|
styleId?: string;
|
|
2546
2580
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2581
|
+
form?: Record<string, any>;
|
|
2582
|
+
client?: Record<string, any>;
|
|
2547
2583
|
} & React.RefAttributes<HTMLElement>>;
|
|
2548
2584
|
|
|
2549
2585
|
declare const TenantProfile: React.ForwardRefExoticComponent<{
|
|
@@ -2555,6 +2591,8 @@ declare const TenantProfile: React.ForwardRefExoticComponent<{
|
|
|
2555
2591
|
debug?: boolean;
|
|
2556
2592
|
styleId?: string;
|
|
2557
2593
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2594
|
+
form?: Record<string, any>;
|
|
2595
|
+
client?: Record<string, any>;
|
|
2558
2596
|
} & React.RefAttributes<HTMLElement>>;
|
|
2559
2597
|
|
|
2560
2598
|
declare const UserManagement: React.ForwardRefExoticComponent<{
|
|
@@ -2566,6 +2604,8 @@ declare const UserManagement: React.ForwardRefExoticComponent<{
|
|
|
2566
2604
|
debug?: boolean;
|
|
2567
2605
|
styleId?: string;
|
|
2568
2606
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2607
|
+
form?: Record<string, any>;
|
|
2608
|
+
client?: Record<string, any>;
|
|
2569
2609
|
} & React.RefAttributes<HTMLElement>>;
|
|
2570
2610
|
|
|
2571
2611
|
declare const UserProfile: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -2577,6 +2617,8 @@ declare const UserProfile: React.ForwardRefExoticComponent<Omit<{
|
|
|
2577
2617
|
debug?: boolean;
|
|
2578
2618
|
styleId?: string;
|
|
2579
2619
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2620
|
+
form?: Record<string, any>;
|
|
2621
|
+
client?: Record<string, any>;
|
|
2580
2622
|
}, "tenant"> & {
|
|
2581
2623
|
onLogout?: (e: CustomEvent<any>) => void;
|
|
2582
2624
|
} & React.RefAttributes<HTMLElement>>;
|