@dynamic-labs-sdk/client 0.25.2 → 0.26.1
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/{InvalidParamError-BxdCGMzn.esm.js → InvalidParamError-B55FwITx.esm.js} +76 -74
- package/dist/InvalidParamError-B55FwITx.esm.js.map +1 -0
- package/dist/{InvalidParamError-C5CPZiAb.native.esm.js → InvalidParamError-ByTZyQwv.native.esm.js} +76 -74
- package/dist/InvalidParamError-ByTZyQwv.native.esm.js.map +1 -0
- package/dist/{InvalidParamError-Dg0Tc6h7.cjs.js → InvalidParamError-D-SHhcTB.cjs} +76 -74
- package/dist/InvalidParamError-D-SHhcTB.cjs.map +1 -0
- package/dist/{NotWaasWalletAccountError-C3DRuoiZ.native.esm.js → NotWaasWalletAccountError-CeMjVe2F.native.esm.js} +3 -3
- package/dist/{NotWaasWalletAccountError-C3DRuoiZ.native.esm.js.map → NotWaasWalletAccountError-CeMjVe2F.native.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-w4J6uXP2.cjs.js → NotWaasWalletAccountError-EPhK7TaK.cjs} +3 -3
- package/dist/NotWaasWalletAccountError-EPhK7TaK.cjs.map +1 -0
- package/dist/{NotWaasWalletAccountError-DjVbgGrH.esm.js → NotWaasWalletAccountError-_H23Gu_v.esm.js} +3 -3
- package/dist/{NotWaasWalletAccountError-DjVbgGrH.esm.js.map → NotWaasWalletAccountError-_H23Gu_v.esm.js.map} +1 -1
- package/dist/client/core/createCore/createCore.d.ts.map +1 -1
- package/dist/{core.cjs.js → core.cjs} +6 -6
- package/dist/core.cjs.map +1 -0
- package/dist/core.esm.js +5 -5
- package/dist/core.native.esm.js +5 -19
- package/dist/core.native.esm.js.map +1 -1
- package/dist/exports/index.d.ts +6 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-DnfmH9wZ.native.esm.js → getNetworkProviderFromNetworkId-BVhQ3-C5.native.esm.js} +46 -31
- package/dist/getNetworkProviderFromNetworkId-BVhQ3-C5.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-DRAq7tIx.cjs.js → getNetworkProviderFromNetworkId-CY555AiJ.cjs} +5 -4
- package/dist/getNetworkProviderFromNetworkId-CY555AiJ.cjs.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-BzJ_kChE.esm.js → getNetworkProviderFromNetworkId-DWSOEnSr.esm.js} +5 -4
- package/dist/getNetworkProviderFromNetworkId-DWSOEnSr.esm.js.map +1 -0
- package/dist/{getSignedSessionId-CDCWfHxY.cjs.js → getSignedSessionId-CWNj8rZW.cjs} +3 -3
- package/dist/getSignedSessionId-CWNj8rZW.cjs.map +1 -0
- package/dist/{getSignedSessionId-CZnVdASR.native.esm.js → getSignedSessionId-GTJp6UnP.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-CZnVdASR.native.esm.js.map → getSignedSessionId-GTJp6UnP.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-DerECbsD.esm.js → getSignedSessionId-GVIy9gR0.esm.js} +3 -3
- package/dist/{getSignedSessionId-DerECbsD.esm.js.map → getSignedSessionId-GVIy9gR0.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-Bznazz-w.cjs.js → getVerifiedCredentialForWalletAccount-BqaTVz4z.cjs} +33 -3
- package/dist/getVerifiedCredentialForWalletAccount-BqaTVz4z.cjs.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-C2LbBPET.esm.js → getVerifiedCredentialForWalletAccount-Bx9dMVjF.esm.js} +27 -3
- package/dist/getVerifiedCredentialForWalletAccount-Bx9dMVjF.esm.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-B18TOqzI.native.esm.js → getVerifiedCredentialForWalletAccount-KmSG5wRc.native.esm.js} +27 -3
- package/dist/getVerifiedCredentialForWalletAccount-KmSG5wRc.native.esm.js.map +1 -0
- package/dist/{index.cjs.js → index.cjs} +130 -70
- package/dist/index.cjs.map +1 -0
- package/dist/index.esm.js +125 -68
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +176 -250
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-HwI5Mu8R.native.esm.js → isMfaRequiredForAction-BS0JYBvl.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-HwI5Mu8R.native.esm.js.map → isMfaRequiredForAction-BS0JYBvl.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-BulokP-s.esm.js → isMfaRequiredForAction-DVA7aeXI.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-BulokP-s.esm.js.map → isMfaRequiredForAction-DVA7aeXI.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-DG4IaOFU.cjs.js → isMfaRequiredForAction-V3A2BO7c.cjs} +2 -2
- package/dist/isMfaRequiredForAction-V3A2BO7c.cjs.map +1 -0
- package/dist/modules/apiClient/createApiClient.d.ts +1 -1
- package/dist/modules/apiClient/createApiClient.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts +1 -1
- package/dist/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.d.ts +4 -12
- package/dist/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/completeSocialAuthentication/completeSocialAuthentication.d.ts +4 -12
- package/dist/modules/auth/social/oauth/completeSocialAuthentication/completeSocialAuthentication.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.d.ts +20 -0
- package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.types.d.ts +6 -0
- package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.types.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/completeSocialRedirect/index.d.ts +2 -0
- package/dist/modules/auth/social/oauth/completeSocialRedirect/index.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.d.ts +4 -9
- package/dist/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.d.ts +16 -0
- package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.types.d.ts +4 -0
- package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.types.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/index.d.ts +2 -0
- package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/index.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/addOAuthUrlParams/index.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/{authenticateWithSocial → signInWithSocialRedirect}/buildOAuthUrl/buildOAuthUrl.d.ts +1 -1
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/buildOAuthUrl.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/getOAuthBaseUrl/getOAuthBaseUrl.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/getOAuthBaseUrl/index.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/index.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/index.d.ts +2 -0
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/index.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.d.ts +19 -0
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.types.d.ts +6 -0
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.types.d.ts.map +1 -0
- package/dist/modules/sessionKeys/generateSessionKeys/generateSessionKeys.d.ts.map +1 -1
- package/dist/modules/waas/restoreUserSharesForAllWalletAccounts/restoreUserSharesForAllWalletAccounts.d.ts.map +1 -1
- package/dist/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.d.ts +2 -1
- package/dist/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.d.ts.map +1 -1
- package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts.map +1 -1
- package/dist/services/instrumentation/instrumentation.types.d.ts +2 -0
- package/dist/services/instrumentation/instrumentation.types.d.ts.map +1 -1
- package/dist/services/passkey/createPasskeyService/createPasskeyService.d.ts +11 -0
- package/dist/services/passkey/createPasskeyService/createPasskeyService.d.ts.map +1 -0
- package/dist/services/passkey/createPasskeyService/index.d.ts +2 -0
- package/dist/services/passkey/createPasskeyService/index.d.ts.map +1 -0
- package/dist/services/passkey/index.d.ts +1 -1
- package/dist/services/passkey/index.d.ts.map +1 -1
- package/dist/services/passkey/passkey.types.d.ts +4 -0
- package/dist/services/passkey/passkey.types.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/{waas.cjs.js → waas.cjs} +5 -5
- package/dist/waas.cjs.map +1 -0
- package/dist/waas.esm.js +3 -3
- package/dist/waas.native.esm.js +3 -3
- package/dist/{waasCore.cjs.js → waasCore.cjs} +5 -5
- package/dist/waasCore.cjs.map +1 -0
- package/dist/waasCore.esm.js +3 -3
- package/dist/waasCore.native.esm.js +3 -3
- package/package.json +13 -8
- package/dist/InvalidParamError-BxdCGMzn.esm.js.map +0 -1
- package/dist/InvalidParamError-C5CPZiAb.native.esm.js.map +0 -1
- package/dist/InvalidParamError-Dg0Tc6h7.cjs.js.map +0 -1
- package/dist/NotWaasWalletAccountError-w4J6uXP2.cjs.js.map +0 -1
- package/dist/core.cjs.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-BzJ_kChE.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-DRAq7tIx.cjs.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-DnfmH9wZ.native.esm.js.map +0 -1
- package/dist/getSignedSessionId-CDCWfHxY.cjs.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-B18TOqzI.native.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-Bznazz-w.cjs.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-C2LbBPET.esm.js.map +0 -1
- package/dist/index.cjs.js.map +0 -1
- package/dist/isMfaRequiredForAction-DG4IaOFU.cjs.js.map +0 -1
- package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.d.ts.map +0 -1
- package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/addOAuthUrlParams/index.d.ts.map +0 -1
- package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/buildOAuthUrl.d.ts.map +0 -1
- package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/getOAuthBaseUrl/getOAuthBaseUrl.d.ts.map +0 -1
- package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/getOAuthBaseUrl/index.d.ts.map +0 -1
- package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/index.d.ts.map +0 -1
- package/dist/services/passkey/createWebPasskeyService/createWebPasskeyService.d.ts +0 -7
- package/dist/services/passkey/createWebPasskeyService/createWebPasskeyService.d.ts.map +0 -1
- package/dist/services/passkey/createWebPasskeyService/index.d.ts +0 -2
- package/dist/services/passkey/createWebPasskeyService/index.d.ts.map +0 -1
- package/dist/waas.cjs.js.map +0 -1
- package/dist/waasCore.cjs.js.map +0 -1
- /package/dist/modules/auth/social/oauth/{authenticateWithSocial → signInWithSocialRedirect}/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.d.ts +0 -0
- /package/dist/modules/auth/social/oauth/{authenticateWithSocial → signInWithSocialRedirect}/buildOAuthUrl/addOAuthUrlParams/index.d.ts +0 -0
- /package/dist/modules/auth/social/oauth/{authenticateWithSocial → signInWithSocialRedirect}/buildOAuthUrl/getOAuthBaseUrl/getOAuthBaseUrl.d.ts +0 -0
- /package/dist/modules/auth/social/oauth/{authenticateWithSocial → signInWithSocialRedirect}/buildOAuthUrl/getOAuthBaseUrl/index.d.ts +0 -0
- /package/dist/modules/auth/social/oauth/{authenticateWithSocial → signInWithSocialRedirect}/buildOAuthUrl/index.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as instrumentFunction, F as getDefaultClient, u as __createApiClient_wrapped, w as assertDefined, z as getCore } from "./InvalidParamError-ByTZyQwv.native.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
|
|
4
4
|
/**
|
|
@@ -86,4 +86,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
|
|
|
86
86
|
|
|
87
87
|
//#endregion
|
|
88
88
|
export { __getMfaMethods_wrapped as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
|
|
89
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
89
|
+
//# sourceMappingURL=isMfaRequiredForAction-BS0JYBvl.native.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMfaRequiredForAction-
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-BS0JYBvl.native.esm.js","names":["getMfaMethods"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @instrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @not-instrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCTC,MAAM,OAAA,QAAe,OAAO;QAG1B,MAFe,0BAAK,EAAa,EAAA,OAAA,CAEjC,kBAAA;;EAEF,cAAO;EACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJD,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAMA,wBAAc,OAAO,EAG5B"}
|
package/dist/{isMfaRequiredForAction-BulokP-s.esm.js → isMfaRequiredForAction-DVA7aeXI.esm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as instrumentFunction, F as getDefaultClient, u as __createApiClient_wrapped, w as assertDefined, z as getCore } from "./InvalidParamError-B55FwITx.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
|
|
4
4
|
/**
|
|
@@ -86,4 +86,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
|
|
|
86
86
|
|
|
87
87
|
//#endregion
|
|
88
88
|
export { __getMfaMethods_wrapped as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
|
|
89
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
89
|
+
//# sourceMappingURL=isMfaRequiredForAction-DVA7aeXI.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMfaRequiredForAction-
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-DVA7aeXI.esm.js","names":["getMfaMethods"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @instrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @not-instrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCTC,MAAM,OAAA,QAAe,OAAO;QAG1B,MAFe,0BAAK,EAAa,EAAA,OAAA,CAEjC,kBAAA;;EAEF,cAAO;EACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJD,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAMA,wBAAc,OAAO,EAG5B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_InvalidParamError = require('./InvalidParamError-
|
|
1
|
+
const require_InvalidParamError = require('./InvalidParamError-D-SHhcTB.cjs');
|
|
2
2
|
|
|
3
3
|
//#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
|
|
4
4
|
/**
|
|
@@ -103,4 +103,4 @@ Object.defineProperty(exports, 'isMfaRequiredForAction', {
|
|
|
103
103
|
return isMfaRequiredForAction;
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
106
|
+
//# sourceMappingURL=isMfaRequiredForAction-V3A2BO7c.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-V3A2BO7c.cjs","names":["getDefaultClient","getMfaMethods"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @instrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @not-instrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,4CAAU,KAAA;;;AAK1C,yCAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCTC,MAAM,OAAA,kCAAe,OAAO;QAG1B,MAFe,oDAAK,EAAa,EAAA,OAAA,CAEjC,kBAAA;;EAEF,cAAO;EACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJD,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASA,4CAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAMC,wBAAc,OAAO,EAG5B"}
|
|
@@ -5,7 +5,7 @@ import type { CreateApiClientOptions } from './apiClient.types';
|
|
|
5
5
|
* Returns a new instance of the SDK API client.
|
|
6
6
|
*
|
|
7
7
|
* This is not meant for storing, as it is very light we can create it whenever needed.
|
|
8
|
-
|
|
8
|
+
* @instrumented
|
|
9
9
|
*/
|
|
10
10
|
export declare const createApiClient: (options: CreateApiClientOptions | undefined, client: DynamicClient) => SDKApi;
|
|
11
11
|
//# sourceMappingURL=createApiClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createApiClient.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/createApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAInE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"createApiClient.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/createApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAInE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAiChE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,YACjB,sBAAsB,sBACvB,aAAa,WAqEtB,CAAC"}
|
|
@@ -11,7 +11,7 @@ export type SignInWithPasskeyParams = {
|
|
|
11
11
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
12
12
|
* @returns A promise that resolves to the authentication response.
|
|
13
13
|
* @throws NoWebAuthNSupportError If WebAuthn is not supported by the browser.
|
|
14
|
-
|
|
14
|
+
* @instrumented
|
|
15
15
|
*/
|
|
16
16
|
export declare const signInWithPasskey: ({ relatedOriginRpId }?: SignInWithPasskeyParams, client?: import("../../../../exports").DynamicClient) => Promise<import("@dynamic-labs/sdk-api-core").VerifyResponse>;
|
|
17
17
|
//# sourceMappingURL=signInWithPasskey.d.ts.map
|
|
@@ -4,19 +4,11 @@ type AuthenticateWithSocialParams = {
|
|
|
4
4
|
redirectUrl: string;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* @deprecated Renamed to {@link signInWithSocialRedirect}. This alias will be
|
|
8
|
+
* removed in a future major version.
|
|
8
9
|
*
|
|
9
|
-
*
|
|
10
|
-
* authorization page to complete OAuth authentication flow.
|
|
11
|
-
* After the oauth flow is complete, the user will be redirected back to your app.
|
|
12
|
-
* You can then call `detectOAuthRedirect` to check if the user got redirected back to your app due to the oauth flow,
|
|
13
|
-
* and finally call `completeSocialAuthentication` to complete the social authentication flow.
|
|
14
|
-
*
|
|
15
|
-
* @param params.provider - The social provider to authenticate with (e.g., 'google', 'github').
|
|
16
|
-
* @param params.redirectUrl - The URL to redirect back to after authentication.
|
|
17
|
-
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
18
|
-
* @instrumented
|
|
10
|
+
* @instrumented
|
|
19
11
|
*/
|
|
20
|
-
export declare const authenticateWithSocial: (
|
|
12
|
+
export declare const authenticateWithSocial: (params: AuthenticateWithSocialParams, client?: import("../../../../../exports").DynamicClient) => Promise<void>;
|
|
21
13
|
export {};
|
|
22
14
|
//# sourceMappingURL=authenticateWithSocial.d.ts.map
|
package/dist/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticateWithSocial.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authenticateWithSocial.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,KAAK,4BAA4B,GAAG;IAClC,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,WACzB,4BAA4B,2EAEO,CAAC"}
|
|
@@ -5,19 +5,11 @@ type CompleteSocialAuthenticationParams = {
|
|
|
5
5
|
url: URL;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* @deprecated Renamed to {@link completeSocialRedirect}. This alias will be
|
|
9
|
+
* removed in a future major version.
|
|
9
10
|
*
|
|
10
|
-
*
|
|
11
|
-
* and completes the user authentication with the social provider.
|
|
12
|
-
*
|
|
13
|
-
* @param params.url - The callback URL containing OAuth response parameters.
|
|
14
|
-
* @param [params.requestedScopes] - Optional scopes to request an elevated access token when verifying (linking) a social account.
|
|
15
|
-
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
16
|
-
* @returns A promise that resolves to the authenticated user or null.
|
|
17
|
-
* @throws MissingSocialUrlParamError If required OAuth parameters are missing.
|
|
18
|
-
* @throws InvalidRedirectStorageStateError If the stored state doesn't match.
|
|
19
|
-
* @instrumented
|
|
11
|
+
* @instrumented
|
|
20
12
|
*/
|
|
21
|
-
export declare const completeSocialAuthentication: (
|
|
13
|
+
export declare const completeSocialAuthentication: (params: CompleteSocialAuthenticationParams, client?: import("../../../../../exports").DynamicClient) => Promise<User | null>;
|
|
22
14
|
export {};
|
|
23
15
|
//# sourceMappingURL=completeSocialAuthentication.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completeSocialAuthentication.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/completeSocialAuthentication/completeSocialAuthentication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"completeSocialAuthentication.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/completeSocialAuthentication/completeSocialAuthentication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAG7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAGxD,KAAK,kCAAkC,GAAG;IACxC,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC;IAC/B,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,WAC/B,kCAAkC,8DAEzC,OAAO,CAAC,IAAI,GAAG,IAAI,CAA2C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { User } from '../../../../user/user.types';
|
|
2
|
+
import type { CompleteSocialRedirectParams } from './completeSocialRedirect.types';
|
|
3
|
+
export type { CompleteSocialRedirectParams } from './completeSocialRedirect.types';
|
|
4
|
+
/**
|
|
5
|
+
* Completes the social authentication flow after the OAuth redirect.
|
|
6
|
+
*
|
|
7
|
+
* Processes the OAuth callback URL with the authorization code and finishes
|
|
8
|
+
* authenticating (or linking) the user with the social provider. This is the
|
|
9
|
+
* final step after `signInWithSocialRedirect` + `detectSocialRedirectUrl`.
|
|
10
|
+
*
|
|
11
|
+
* @param params.url - The callback URL containing OAuth response parameters.
|
|
12
|
+
* @param [params.requestedScopes] - Optional scopes to request an elevated access token when verifying (linking) a social account.
|
|
13
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
14
|
+
* @returns A promise that resolves to the authenticated user or null.
|
|
15
|
+
* @throws MissingSocialUrlParamError If required OAuth parameters are missing.
|
|
16
|
+
* @throws InvalidRedirectStorageStateError If the stored state doesn't match.
|
|
17
|
+
* @instrumented
|
|
18
|
+
*/
|
|
19
|
+
export declare const completeSocialRedirect: ({ url, requestedScopes }: CompleteSocialRedirectParams, client?: import("../../../../../exports").DynamicClient) => Promise<User | null>;
|
|
20
|
+
//# sourceMappingURL=completeSocialRedirect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completeSocialRedirect.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAGxD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAEnF,YAAY,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAEnF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,sBAAsB,6BACP,4BAA4B,8DAErD,OAAO,CAAC,IAAI,GAAG,IAAI,CAgErB,CAAC"}
|
package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.types.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completeSocialRedirect.types.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,MAAM,4BAA4B,GAAG;IACzC,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC;IAC/B,GAAG,EAAE,GAAG,CAAC;CACV,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/completeSocialRedirect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -2,16 +2,11 @@ type DetectOAuthRedirectParams = {
|
|
|
2
2
|
url: URL;
|
|
3
3
|
};
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* @deprecated Renamed to {@link detectSocialRedirectUrl}. This alias will be
|
|
6
|
+
* removed in a future major version.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
* OAuth callback data from a social authentication flow.
|
|
9
|
-
*
|
|
10
|
-
* @param params.url - The URL to check for OAuth redirect parameters.
|
|
11
|
-
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
12
|
-
* @returns A promise that resolves to true if the URL is an OAuth redirect, false otherwise.
|
|
13
|
-
* @instrumented
|
|
8
|
+
* @instrumented
|
|
14
9
|
*/
|
|
15
|
-
export declare const detectOAuthRedirect: (
|
|
10
|
+
export declare const detectOAuthRedirect: (params: DetectOAuthRedirectParams, client?: import("../../../../../exports").DynamicClient) => Promise<boolean>;
|
|
16
11
|
export {};
|
|
17
12
|
//# sourceMappingURL=detectOAuthRedirect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectOAuthRedirect.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"detectOAuthRedirect.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.ts"],"names":[],"mappings":"AAGA,KAAK,yBAAyB,GAAG;IAC/B,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,WACtB,yBAAyB,8DAEhC,OAAO,CAAC,OAAO,CAA4C,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DetectSocialRedirectUrlParams } from './detectSocialRedirectUrl.types';
|
|
2
|
+
export type { DetectSocialRedirectUrlParams } from './detectSocialRedirectUrl.types';
|
|
3
|
+
/**
|
|
4
|
+
* Detects whether the given URL is an OAuth redirect from a social provider.
|
|
5
|
+
*
|
|
6
|
+
* Examines the URL parameters to determine whether it carries OAuth callback
|
|
7
|
+
* data that originated from a social authentication flow started by
|
|
8
|
+
* `signInWithSocialRedirect`.
|
|
9
|
+
*
|
|
10
|
+
* @param params.url - The URL to check for OAuth redirect parameters.
|
|
11
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
12
|
+
* @returns A promise that resolves to true if the URL is an OAuth redirect, false otherwise.
|
|
13
|
+
* @instrumented
|
|
14
|
+
*/
|
|
15
|
+
export declare const detectSocialRedirectUrl: ({ url }: DetectSocialRedirectUrlParams, client?: import("../../../../../exports").DynamicClient) => Promise<boolean>;
|
|
16
|
+
//# sourceMappingURL=detectSocialRedirectUrl.d.ts.map
|
package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectSocialRedirectUrl.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAErF,YAAY,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAErF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,YACzB,6BAA6B,8DAErC,OAAO,CAAC,OAAO,CAkBjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectSocialRedirectUrl.types.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,6BAA6B,GAAG;IAC1C,GAAG,EAAE,GAAG,CAAC;CACV,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/detectSocialRedirectUrl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addOAuthUrlParams.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,4BAA4B,CAAC;AAOzE,MAAM,MAAM,wBAAwB,GAAG;IACrC,+CAA+C;IAC/C,OAAO,EAAE,GAAG,CAAC;IAEb;OACG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC,uDAAuD;IACvD,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF;GACG;AACH,eAAO,MAAM,iBAAiB,uDAI3B,wBAAwB,KAAG,GAmC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/addOAuthUrlParams/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { type ProviderEnum } from '@dynamic-labs/sdk-api-core';
|
|
|
2
2
|
import type { DynamicCore } from '../../../../../../client/core/types';
|
|
3
3
|
type OAuthUrl = {
|
|
4
4
|
/** A randomly generated string for PKCE flows. * @not-instrumented
|
|
5
|
-
|
|
5
|
+
*/
|
|
6
6
|
codeVerifier?: string;
|
|
7
7
|
/** A randomly generated string for the OAuth flow. */
|
|
8
8
|
state: string;
|
package/dist/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/buildOAuthUrl.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildOAuthUrl.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/buildOAuthUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAElB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAUvE,KAAK,QAAQ,GAAG;IACd;OACG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IAEd,4CAA4C;IAC5C,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF;GACG;AAEH,eAAO,MAAM,aAAa,SAElB,WAAW,YAGP,YAAY,KACrB,OAAO,CAAC,QAAQ,CAkDlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOAuthBaseUrl.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/getOAuthBaseUrl/getOAuthBaseUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,4BAA4B,CAAC;AAIzE;GACG;AACH,eAAO,MAAM,eAAe,aAAc,QAAQ,KAAG,GA4BpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/getOAuthBaseUrl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/signInWithSocialRedirect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SignInWithSocialRedirectParams } from './signInWithSocialRedirect.types';
|
|
2
|
+
export type { SignInWithSocialRedirectParams } from './signInWithSocialRedirect.types';
|
|
3
|
+
/**
|
|
4
|
+
* Initiates social authentication by redirecting to the OAuth provider.
|
|
5
|
+
*
|
|
6
|
+
* This function redirects the user to the specified social provider's
|
|
7
|
+
* authorization page to complete the OAuth authentication flow.
|
|
8
|
+
* After the flow is complete, the user is redirected back to your app.
|
|
9
|
+
* Call `detectSocialRedirectUrl` to check whether the user was redirected
|
|
10
|
+
* back because of this flow, then call `completeSocialRedirect` to finish
|
|
11
|
+
* the social authentication.
|
|
12
|
+
*
|
|
13
|
+
* @param params.provider - The social provider to authenticate with (e.g., 'google', 'github').
|
|
14
|
+
* @param params.redirectUrl - The URL to redirect back to after authentication.
|
|
15
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
16
|
+
* @instrumented
|
|
17
|
+
*/
|
|
18
|
+
export declare const signInWithSocialRedirect: ({ provider, redirectUrl }: SignInWithSocialRedirectParams, client?: import("../../../../../exports").DynamicClient) => Promise<void>;
|
|
19
|
+
//# sourceMappingURL=signInWithSocialRedirect.d.ts.map
|
package/dist/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signInWithSocialRedirect.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAEvF,YAAY,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAEvF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,8BACR,8BAA8B,2EA4B1D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signInWithSocialRedirect.types.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateSessionKeys.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessionKeys/generateSessionKeys/generateSessionKeys.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"generateSessionKeys.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessionKeys/generateSessionKeys/generateSessionKeys.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,oBAAoB;AACpB,eAAO,MAAM,mBAAmB,WACtB,aAAa,KACpB,OAAO,CAAC,WAAW,CAcrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restoreUserSharesForAllWalletAccounts.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/restoreUserSharesForAllWalletAccounts/restoreUserSharesForAllWalletAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"restoreUserSharesForAllWalletAccounts.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/restoreUserSharesForAllWalletAccounts/restoreUserSharesForAllWalletAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D,wBAAwB;AACxB,eAAO,MAAM,qCAAqC,WACxC,aAAa,kBAiCtB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import type { ObservableState } from '../../../utils/observable/observable.types
|
|
|
3
3
|
import type { Instrumentation } from '../instrumentation.types';
|
|
4
4
|
type ConnectLoggerToInstrumentationParams = {
|
|
5
5
|
environmentId: string;
|
|
6
|
+
extensions: Set<string>;
|
|
6
7
|
instrumentation: Instrumentation;
|
|
7
8
|
logger: Logger;
|
|
8
9
|
sdkSessionId: string;
|
|
@@ -18,6 +19,6 @@ type ConnectLoggerToInstrumentationParams = {
|
|
|
18
19
|
* Only error-level log entries are forwarded.
|
|
19
20
|
* @not-instrumented
|
|
20
21
|
*/
|
|
21
|
-
export declare const connectLoggerToInstrumentation: ({ environmentId, instrumentation, logger, sdkSessionId, sdkVersion, state, }: ConnectLoggerToInstrumentationParams) => void;
|
|
22
|
+
export declare const connectLoggerToInstrumentation: ({ environmentId, extensions, instrumentation, logger, sdkSessionId, sdkVersion, state, }: ConnectLoggerToInstrumentationParams) => void;
|
|
22
23
|
export {};
|
|
23
24
|
//# sourceMappingURL=connectLoggerToInstrumentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectLoggerToInstrumentation.d.ts","sourceRoot":"","sources":["../../../../src/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,KAAK,oCAAoC,GAAG;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,eAAe,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,
|
|
1
|
+
{"version":3,"file":"connectLoggerToInstrumentation.d.ts","sourceRoot":"","sources":["../../../../src/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,KAAK,oCAAoC,GAAG;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,eAAe,EAAE,eAAe,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,6FAQxC,oCAAoC,SAsBtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentFunction.d.ts","sourceRoot":"","sources":["../../../../src/services/instrumentation/instrumentFunction/instrumentFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAoB1E,KAAK,wBAAwB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,IAAI;IACzE,qCAAqC;IACrC,EAAE,EAAE,CAAC,CAAC;IACN,2DAA2D;IAC3D,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,EAAE,MAAM,WAAW,GAAG,SAAS,CAAC;IACvC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,6CAKzE,wBAAwB,CAAC,CAAC,CAAC,KAAG,
|
|
1
|
+
{"version":3,"file":"instrumentFunction.d.ts","sourceRoot":"","sources":["../../../../src/services/instrumentation/instrumentFunction/instrumentFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAoB1E,KAAK,wBAAwB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,IAAI;IACzE,qCAAqC;IACrC,EAAE,EAAE,CAAC,CAAC;IACN,2DAA2D;IAC3D,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,EAAE,MAAM,WAAW,GAAG,SAAS,CAAC;IACvC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,6CAKzE,wBAAwB,CAAC,CAAC,CAAC,KAAG,CAgGhC,CAAC"}
|
|
@@ -13,6 +13,8 @@ export type InstrumentationStatus = 'error' | 'info' | 'debug';
|
|
|
13
13
|
export type InstrumentationEvent = {
|
|
14
14
|
environmentId: string;
|
|
15
15
|
parameters: Record<string, unknown>;
|
|
16
|
+
/** Extension keys registered on the client at the time the event was emitted. */
|
|
17
|
+
registeredExtensionKeys: string[];
|
|
16
18
|
sdkSessionId: string;
|
|
17
19
|
sdkVersion: string;
|
|
18
20
|
status: InstrumentationStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.types.d.ts","sourceRoot":"","sources":["../../../src/services/instrumentation/instrumentation.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5E;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,8EAA8E;AAC9E,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,oBAAoB,GAAG;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,yBAAyB,CAAC;IACjC,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,yEAAyE;AACzE,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,GAAG,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,KAAK,EAAE,4BAA4B,KAAK,IAAI,CAAC;IAC3D,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,YAAY,EAAE,CAAC,SAAS,EAAE,wBAAwB,KAAK,IAAI,CAAC;CAC7D,CAAC"}
|
|
1
|
+
{"version":3,"file":"instrumentation.types.d.ts","sourceRoot":"","sources":["../../../src/services/instrumentation/instrumentation.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5E;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,iFAAiF;IACjF,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,8EAA8E;AAC9E,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,oBAAoB,GAAG;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,yBAAyB,CAAC;IACjC,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,yEAAyE;AACzE,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,GAAG,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,KAAK,EAAE,4BAA4B,KAAK,IAAI,CAAC;IAC3D,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,YAAY,EAAE,CAAC,SAAS,EAAE,wBAAwB,KAAK,IAAI,CAAC;CAC7D,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CreatePasskeyServiceParams, PasskeyService } from '../passkey.types';
|
|
2
|
+
/**
|
|
3
|
+
* Create a passkey service that uses the browser's WebAuthn API.
|
|
4
|
+
*
|
|
5
|
+
* Metadata is accepted for parity with the native implementation (which uses
|
|
6
|
+
* `universalLink` to validate the associated domain) but is unused on web —
|
|
7
|
+
* the browser derives the relying party from `window.location.origin`.
|
|
8
|
+
* @not-instrumented
|
|
9
|
+
*/
|
|
10
|
+
export declare const createPasskeyService: (_params?: CreatePasskeyServiceParams) => PasskeyService;
|
|
11
|
+
//# sourceMappingURL=createPasskeyService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPasskeyService.d.ts","sourceRoot":"","sources":["../../../../src/services/passkey/createPasskeyService/createPasskeyService.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,0BAA0B,EAC1B,cAAc,EACf,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,aACrB,0BAA0B,KACnC,cAID,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/passkey/createPasskeyService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/passkey/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/passkey/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { AuthenticationResponseJSON, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialRequestOptionsJSON, RegistrationResponseJSON } from '@simplewebauthn/browser';
|
|
2
|
+
import type { DynamicClientConfig } from '../../client/types/DynamicClientConfig';
|
|
3
|
+
export type CreatePasskeyServiceParams = {
|
|
4
|
+
metadata: DynamicClientConfig['metadata'];
|
|
5
|
+
};
|
|
2
6
|
export type PasskeyService = {
|
|
3
7
|
authenticate: (options: {
|
|
4
8
|
optionsJSON: PublicKeyCredentialRequestOptionsJSON;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passkey.types.d.ts","sourceRoot":"","sources":["../../../src/services/passkey/passkey.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,sCAAsC,EACtC,qCAAqC,EACrC,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,EAAE,CAAC,OAAO,EAAE;QACtB,WAAW,EAAE,qCAAqC,CAAC;QACnD,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,0BAA0B,CAAC,EAAE,OAAO,CAAC;KACtC,KAAK,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC1C,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,QAAQ,EAAE,CAAC,OAAO,EAAE;QAClB,WAAW,EAAE,sCAAsC,CAAC;QACpD,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,KAAK,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACzC,CAAC"}
|
|
1
|
+
{"version":3,"file":"passkey.types.d.ts","sourceRoot":"","sources":["../../../src/services/passkey/passkey.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,sCAAsC,EACtC,qCAAqC,EACrC,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAElF,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,EAAE,CAAC,OAAO,EAAE;QACtB,WAAW,EAAE,qCAAqC,CAAC;QACnD,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,0BAA0B,CAAC,EAAE,OAAO,CAAC;KACtC,KAAK,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC1C,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,QAAQ,EAAE,CAAC,OAAO,EAAE;QAClB,WAAW,EAAE,sCAAsC,CAAC;QACpD,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,KAAK,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACzC,CAAC"}
|