@aws-amplify/auth 6.13.4-unstable.d6f1422.0 → 6.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/cjs/Errors.js.map +1 -1
  2. package/dist/cjs/client/apis/index.js.map +1 -1
  3. package/dist/cjs/client/flows/shared/handlePasswordSRP.js.map +1 -1
  4. package/dist/cjs/client/flows/userAuth/handleSelectChallengeWithPasswordSRP.js.map +1 -1
  5. package/dist/cjs/client/flows/userAuth/handleUserAuthFlow.js.map +1 -1
  6. package/dist/cjs/client/flows/userAuth/handleWebAuthnSignInResult.js.map +1 -1
  7. package/dist/cjs/client/utils/index.js.map +1 -1
  8. package/dist/cjs/client/utils/passkey/errors.js.map +1 -1
  9. package/dist/cjs/client/utils/passkey/getPasskey.js.map +1 -1
  10. package/dist/cjs/client/utils/passkey/index.js.map +1 -1
  11. package/dist/cjs/client/utils/passkey/registerPasskey.js.map +1 -1
  12. package/dist/cjs/client/utils/passkey/serde.js.map +1 -1
  13. package/dist/cjs/client/utils/passkey/types/index.js.map +1 -1
  14. package/dist/cjs/client/utils/store/autoSignInStore.js.map +1 -1
  15. package/dist/cjs/client/utils/store/signInStore.js.map +1 -1
  16. package/dist/cjs/errors/AuthError.js.map +1 -1
  17. package/dist/cjs/errors/utils/assertServiceError.js.map +1 -1
  18. package/dist/cjs/errors/utils/assertValidationError.js.map +1 -1
  19. package/dist/cjs/foundation/apis/index.js.map +1 -1
  20. package/dist/cjs/foundation/convert/base64url/index.js.map +1 -1
  21. package/dist/cjs/foundation/convert/index.js.map +1 -1
  22. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentityProvider/constants.js.map +1 -1
  23. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentityProvider/createSignUpClient.js.map +1 -1
  24. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentityProvider/index.js.map +1 -1
  25. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/index.js.map +1 -1
  26. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createEmptyResponseDeserializer.js.map +1 -1
  27. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolDeserializer.js.map +1 -1
  28. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/index.js.map +1 -1
  29. package/dist/cjs/foundation/parsers/index.js.map +1 -1
  30. package/dist/cjs/foundation/parsers/regionParsers.js.map +1 -1
  31. package/dist/cjs/index.js.map +1 -1
  32. package/dist/cjs/providers/cognito/apis/autoSignIn.js.map +1 -1
  33. package/dist/cjs/providers/cognito/apis/confirmSignIn.js.map +1 -1
  34. package/dist/cjs/providers/cognito/apis/confirmSignUp.js.map +1 -1
  35. package/dist/cjs/providers/cognito/apis/fetchDevices.js.map +1 -1
  36. package/dist/cjs/providers/cognito/apis/internal/getCurrentUser.js.map +1 -1
  37. package/dist/cjs/providers/cognito/apis/server/index.js.map +1 -1
  38. package/dist/cjs/providers/cognito/apis/setUpTOTP.js.map +1 -1
  39. package/dist/cjs/providers/cognito/apis/signInWithCustomAuth.js.map +1 -1
  40. package/dist/cjs/providers/cognito/apis/signInWithCustomSRPAuth.js.map +1 -1
  41. package/dist/cjs/providers/cognito/apis/signInWithRedirect.js.map +1 -1
  42. package/dist/cjs/providers/cognito/apis/signInWithSRP.js.map +1 -1
  43. package/dist/cjs/providers/cognito/apis/signInWithUserAuth.js.map +1 -1
  44. package/dist/cjs/providers/cognito/apis/signInWithUserPassword.js.map +1 -1
  45. package/dist/cjs/providers/cognito/apis/signOut.js.map +1 -1
  46. package/dist/cjs/providers/cognito/apis/signUp.js.map +1 -1
  47. package/dist/cjs/providers/cognito/apis/updateMFAPreference.js.map +1 -1
  48. package/dist/cjs/providers/cognito/apis/updateUserAttributes.js.map +1 -1
  49. package/dist/cjs/providers/cognito/credentialsProvider/IdentityIdProvider.js.map +1 -1
  50. package/dist/cjs/providers/cognito/credentialsProvider/IdentityIdStore.js.map +1 -1
  51. package/dist/cjs/providers/cognito/credentialsProvider/credentialsProvider.js.map +1 -1
  52. package/dist/cjs/providers/cognito/credentialsProvider/index.js.map +1 -1
  53. package/dist/cjs/providers/cognito/credentialsProvider/utils.js.map +1 -1
  54. package/dist/cjs/providers/cognito/factories/createCognitoIdentityPoolEndpointResolver.js.map +1 -1
  55. package/dist/cjs/providers/cognito/factories/createCognitoUserPoolEndpointResolver.js.map +1 -1
  56. package/dist/cjs/providers/cognito/factories/index.js.map +1 -1
  57. package/dist/cjs/providers/cognito/index.js.map +1 -1
  58. package/dist/cjs/providers/cognito/tokenProvider/CognitoUserPoolsTokenProvider.js.map +1 -1
  59. package/dist/cjs/providers/cognito/tokenProvider/TokenOrchestrator.js.map +1 -1
  60. package/dist/cjs/providers/cognito/tokenProvider/TokenStore.js.map +1 -1
  61. package/dist/cjs/providers/cognito/tokenProvider/cacheTokens.js.map +1 -1
  62. package/dist/cjs/providers/cognito/tokenProvider/index.js.map +1 -1
  63. package/dist/cjs/providers/cognito/utils/apiHelpers.js.map +1 -1
  64. package/dist/cjs/providers/cognito/utils/dispatchSignedInHubEvent.js.map +1 -1
  65. package/dist/cjs/providers/cognito/utils/getNewDeviceMetadata.js.map +1 -1
  66. package/dist/cjs/providers/cognito/utils/handlePasswordVerifierChallenge.js.map +1 -1
  67. package/dist/cjs/providers/cognito/utils/oauth/attemptCompleteOAuthFlow.js.map +1 -1
  68. package/dist/cjs/providers/cognito/utils/oauth/cancelOAuthFlow.js.map +1 -1
  69. package/dist/cjs/providers/cognito/utils/oauth/completeOAuthFlow.js.map +1 -1
  70. package/dist/cjs/providers/cognito/utils/oauth/enableOAuthListener.js.map +1 -1
  71. package/dist/cjs/providers/cognito/utils/oauth/generateCodeVerifier.js.map +1 -1
  72. package/dist/cjs/providers/cognito/utils/oauth/getRedirectUrl.js.map +1 -1
  73. package/dist/cjs/providers/cognito/utils/oauth/getRedirectUrl.native.js.map +1 -1
  74. package/dist/cjs/providers/cognito/utils/oauth/handleOAuthSignOut.js.map +1 -1
  75. package/dist/cjs/providers/cognito/utils/oauth/handleOAuthSignOut.native.js.map +1 -1
  76. package/dist/cjs/providers/cognito/utils/oauth/index.js.map +1 -1
  77. package/dist/cjs/providers/cognito/utils/oauth/inflightPromise.js.map +1 -1
  78. package/dist/cjs/providers/cognito/utils/oauth/validateState.js.map +1 -1
  79. package/dist/cjs/providers/cognito/utils/refreshAuthTokens.js.map +1 -1
  80. package/dist/cjs/providers/cognito/utils/retryOnResourceNotFoundException.js.map +1 -1
  81. package/dist/cjs/providers/cognito/utils/signInHelpers.js.map +1 -1
  82. package/dist/cjs/providers/cognito/utils/signInWithRedirectStore.js.map +1 -1
  83. package/dist/cjs/providers/cognito/utils/signUpHelpers.js.map +1 -1
  84. package/dist/cjs/providers/cognito/utils/srp/AuthenticationHelper/AuthenticationHelper.js.map +1 -1
  85. package/dist/cjs/providers/cognito/utils/srp/BigInteger/BigInteger.js.map +1 -1
  86. package/dist/cjs/providers/cognito/utils/srp/BigInteger/index.native.js.map +1 -1
  87. package/dist/cjs/providers/cognito/utils/srp/calculate/calculateA.js.map +1 -1
  88. package/dist/cjs/providers/cognito/utils/srp/calculate/calculateS.js.map +1 -1
  89. package/dist/cjs/providers/cognito/utils/srp/calculate/calculateU.js.map +1 -1
  90. package/dist/cjs/providers/cognito/utils/srp/calculate/index.js.map +1 -1
  91. package/dist/cjs/providers/cognito/utils/srp/constants.js.map +1 -1
  92. package/dist/cjs/providers/cognito/utils/srp/getBytesFromHex.js.map +1 -1
  93. package/dist/cjs/providers/cognito/utils/srp/getHexFromBytes.js.map +1 -1
  94. package/dist/cjs/providers/cognito/utils/srp/getNowString.js.map +1 -1
  95. package/dist/cjs/providers/cognito/utils/srp/getPaddedHex.js.map +1 -1
  96. package/dist/cjs/providers/cognito/utils/srp/getSignatureString.js.map +1 -1
  97. package/dist/cjs/providers/cognito/utils/srp/index.js.map +1 -1
  98. package/dist/cjs/providers/cognito/utils/textEncoder/index.js.map +1 -1
  99. package/dist/cjs/providers/cognito/utils/textEncoder/index.native.js.map +1 -1
  100. package/dist/cjs/providers/cognito/utils/types.js.map +1 -1
  101. package/dist/cjs/providers/cognito/utils/userContextData.js.map +1 -1
  102. package/dist/cjs/utils/index.js.map +1 -1
  103. package/dist/cjs/utils/openAuthSession.js.map +1 -1
  104. package/dist/cjs/utils/openAuthSession.native.js.map +1 -1
  105. package/dist/esm/Errors.mjs.map +1 -1
  106. package/dist/esm/client/flows/shared/handlePasswordSRP.mjs.map +1 -1
  107. package/dist/esm/client/flows/userAuth/handleSelectChallengeWithPasswordSRP.mjs.map +1 -1
  108. package/dist/esm/client/flows/userAuth/handleUserAuthFlow.mjs.map +1 -1
  109. package/dist/esm/client/flows/userAuth/handleWebAuthnSignInResult.mjs.map +1 -1
  110. package/dist/esm/client/utils/passkey/errors.mjs.map +1 -1
  111. package/dist/esm/client/utils/passkey/getPasskey.mjs.map +1 -1
  112. package/dist/esm/client/utils/passkey/registerPasskey.mjs.map +1 -1
  113. package/dist/esm/client/utils/passkey/serde.mjs.map +1 -1
  114. package/dist/esm/client/utils/store/autoSignInStore.mjs.map +1 -1
  115. package/dist/esm/client/utils/store/signInStore.mjs.map +1 -1
  116. package/dist/esm/errors/AuthError.mjs.map +1 -1
  117. package/dist/esm/errors/utils/assertServiceError.mjs.map +1 -1
  118. package/dist/esm/errors/utils/assertValidationError.mjs.map +1 -1
  119. package/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs.map +1 -1
  120. package/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createSignUpClient.mjs.map +1 -1
  121. package/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createEmptyResponseDeserializer.mjs.map +1 -1
  122. package/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolDeserializer.mjs.map +1 -1
  123. package/dist/esm/foundation/parsers/regionParsers.mjs.map +1 -1
  124. package/dist/esm/providers/cognito/apis/autoSignIn.mjs.map +1 -1
  125. package/dist/esm/providers/cognito/apis/confirmSignIn.mjs.map +1 -1
  126. package/dist/esm/providers/cognito/apis/confirmSignUp.mjs.map +1 -1
  127. package/dist/esm/providers/cognito/apis/fetchDevices.mjs.map +1 -1
  128. package/dist/esm/providers/cognito/apis/internal/getCurrentUser.mjs.map +1 -1
  129. package/dist/esm/providers/cognito/apis/setUpTOTP.mjs.map +1 -1
  130. package/dist/esm/providers/cognito/apis/signInWithCustomAuth.mjs.map +1 -1
  131. package/dist/esm/providers/cognito/apis/signInWithCustomSRPAuth.mjs.map +1 -1
  132. package/dist/esm/providers/cognito/apis/signInWithRedirect.mjs.map +1 -1
  133. package/dist/esm/providers/cognito/apis/signInWithSRP.mjs.map +1 -1
  134. package/dist/esm/providers/cognito/apis/signInWithUserAuth.mjs.map +1 -1
  135. package/dist/esm/providers/cognito/apis/signInWithUserPassword.mjs.map +1 -1
  136. package/dist/esm/providers/cognito/apis/signOut.mjs.map +1 -1
  137. package/dist/esm/providers/cognito/apis/signUp.mjs.map +1 -1
  138. package/dist/esm/providers/cognito/apis/updateMFAPreference.mjs.map +1 -1
  139. package/dist/esm/providers/cognito/apis/updateUserAttributes.mjs.map +1 -1
  140. package/dist/esm/providers/cognito/credentialsProvider/IdentityIdProvider.mjs.map +1 -1
  141. package/dist/esm/providers/cognito/credentialsProvider/IdentityIdStore.mjs.map +1 -1
  142. package/dist/esm/providers/cognito/credentialsProvider/credentialsProvider.mjs.map +1 -1
  143. package/dist/esm/providers/cognito/credentialsProvider/utils.mjs.map +1 -1
  144. package/dist/esm/providers/cognito/factories/createCognitoIdentityPoolEndpointResolver.mjs.map +1 -1
  145. package/dist/esm/providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs.map +1 -1
  146. package/dist/esm/providers/cognito/tokenProvider/CognitoUserPoolsTokenProvider.mjs.map +1 -1
  147. package/dist/esm/providers/cognito/tokenProvider/TokenOrchestrator.mjs.map +1 -1
  148. package/dist/esm/providers/cognito/tokenProvider/TokenStore.mjs.map +1 -1
  149. package/dist/esm/providers/cognito/tokenProvider/cacheTokens.mjs.map +1 -1
  150. package/dist/esm/providers/cognito/utils/apiHelpers.mjs.map +1 -1
  151. package/dist/esm/providers/cognito/utils/dispatchSignedInHubEvent.mjs.map +1 -1
  152. package/dist/esm/providers/cognito/utils/getNewDeviceMetadata.mjs.map +1 -1
  153. package/dist/esm/providers/cognito/utils/handlePasswordVerifierChallenge.mjs.map +1 -1
  154. package/dist/esm/providers/cognito/utils/oauth/attemptCompleteOAuthFlow.mjs.map +1 -1
  155. package/dist/esm/providers/cognito/utils/oauth/cancelOAuthFlow.mjs.map +1 -1
  156. package/dist/esm/providers/cognito/utils/oauth/completeOAuthFlow.mjs.map +1 -1
  157. package/dist/esm/providers/cognito/utils/oauth/enableOAuthListener.mjs.map +1 -1
  158. package/dist/esm/providers/cognito/utils/oauth/generateCodeVerifier.mjs.map +1 -1
  159. package/dist/esm/providers/cognito/utils/oauth/getRedirectUrl.mjs.map +1 -1
  160. package/dist/esm/providers/cognito/utils/oauth/getRedirectUrl.native.mjs.map +1 -1
  161. package/dist/esm/providers/cognito/utils/oauth/handleOAuthSignOut.mjs.map +1 -1
  162. package/dist/esm/providers/cognito/utils/oauth/handleOAuthSignOut.native.mjs.map +1 -1
  163. package/dist/esm/providers/cognito/utils/oauth/inflightPromise.mjs.map +1 -1
  164. package/dist/esm/providers/cognito/utils/oauth/validateState.mjs.map +1 -1
  165. package/dist/esm/providers/cognito/utils/refreshAuthTokens.mjs.map +1 -1
  166. package/dist/esm/providers/cognito/utils/retryOnResourceNotFoundException.mjs.map +1 -1
  167. package/dist/esm/providers/cognito/utils/signInHelpers.mjs.map +1 -1
  168. package/dist/esm/providers/cognito/utils/signInWithRedirectStore.mjs.map +1 -1
  169. package/dist/esm/providers/cognito/utils/signUpHelpers.mjs.map +1 -1
  170. package/dist/esm/providers/cognito/utils/srp/AuthenticationHelper/AuthenticationHelper.mjs.map +1 -1
  171. package/dist/esm/providers/cognito/utils/srp/BigInteger/BigInteger.mjs.map +1 -1
  172. package/dist/esm/providers/cognito/utils/srp/BigInteger/index.native.mjs.map +1 -1
  173. package/dist/esm/providers/cognito/utils/srp/calculate/calculateA.mjs.map +1 -1
  174. package/dist/esm/providers/cognito/utils/srp/calculate/calculateS.mjs.map +1 -1
  175. package/dist/esm/providers/cognito/utils/srp/calculate/calculateU.mjs.map +1 -1
  176. package/dist/esm/providers/cognito/utils/srp/constants.mjs.map +1 -1
  177. package/dist/esm/providers/cognito/utils/srp/getBytesFromHex.mjs.map +1 -1
  178. package/dist/esm/providers/cognito/utils/srp/getHexFromBytes.mjs.map +1 -1
  179. package/dist/esm/providers/cognito/utils/srp/getNowString.mjs.map +1 -1
  180. package/dist/esm/providers/cognito/utils/srp/getPaddedHex.mjs.map +1 -1
  181. package/dist/esm/providers/cognito/utils/srp/getSignatureString.mjs.map +1 -1
  182. package/dist/esm/providers/cognito/utils/textEncoder/index.mjs.map +1 -1
  183. package/dist/esm/providers/cognito/utils/textEncoder/index.native.mjs.map +1 -1
  184. package/dist/esm/providers/cognito/utils/types.mjs.map +1 -1
  185. package/dist/esm/providers/cognito/utils/userContextData.mjs.map +1 -1
  186. package/dist/esm/utils/openAuthSession.mjs.map +1 -1
  187. package/dist/esm/utils/openAuthSession.native.mjs.map +1 -1
  188. package/package.json +105 -105
@@ -1 +1 @@
1
- {"version":3,"file":"Errors.js","sources":["../../src/Errors.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.authErrorMessages = exports.NoUserPoolError = exports.AuthError = void 0;\n// TODO: delete this module when the Auth class is removed.\nconst core_1 = require(\"@aws-amplify/core\");\nconst AuthErrorStrings_1 = require(\"./common/AuthErrorStrings\");\nconst logger = new core_1.ConsoleLogger('AuthError');\nclass AuthError extends Error {\n constructor(type) {\n const { message, log } = exports.authErrorMessages[type];\n super(message);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AuthError;\n Object.setPrototypeOf(this, AuthError.prototype);\n this.name = 'AuthError';\n this.log = log || message;\n logger.error(this.log);\n }\n}\nexports.AuthError = AuthError;\nclass NoUserPoolError extends AuthError {\n constructor(type) {\n super(type);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = NoUserPoolError;\n Object.setPrototypeOf(this, NoUserPoolError.prototype);\n this.name = 'NoUserPoolError';\n }\n}\nexports.NoUserPoolError = NoUserPoolError;\nexports.authErrorMessages = {\n oauthSignInError: {\n message: AuthErrorStrings_1.AuthErrorStrings.OAUTH_ERROR,\n log: 'Make sure Cognito Hosted UI has been configured correctly',\n },\n noConfig: {\n message: AuthErrorStrings_1.AuthErrorStrings.DEFAULT_MSG,\n log: `\n Error: Amplify has not been configured correctly.\n This error is typically caused by one of the following scenarios:\n\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n \n 2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n `,\n },\n missingAuthConfig: {\n message: AuthErrorStrings_1.AuthErrorStrings.DEFAULT_MSG,\n log: `\n Error: Amplify has not been configured correctly. \n The configuration object is missing required auth properties.\n This error is typically caused by one of the following scenarios:\n\n 1. Did you run \\`amplify push\\` after adding auth via \\`amplify add auth\\`?\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n 2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.\n `,\n },\n emptyUsername: {\n message: AuthErrorStrings_1.AuthErrorStrings.EMPTY_USERNAME,\n },\n // TODO: should include a list of valid sign-in types\n invalidUsername: {\n message: AuthErrorStrings_1.AuthErrorStrings.INVALID_USERNAME,\n },\n emptyPassword: {\n message: AuthErrorStrings_1.AuthErrorStrings.EMPTY_PASSWORD,\n },\n emptyCode: {\n message: AuthErrorStrings_1.AuthErrorStrings.EMPTY_CODE,\n },\n signUpError: {\n message: AuthErrorStrings_1.AuthErrorStrings.SIGN_UP_ERROR,\n log: 'The first parameter should either be non-null string or object',\n },\n noMFA: {\n message: AuthErrorStrings_1.AuthErrorStrings.NO_MFA,\n },\n invalidMFA: {\n message: AuthErrorStrings_1.AuthErrorStrings.INVALID_MFA,\n },\n emptyChallengeResponse: {\n message: AuthErrorStrings_1.AuthErrorStrings.EMPTY_CHALLENGE,\n },\n noUserSession: {\n message: AuthErrorStrings_1.AuthErrorStrings.NO_USER_SESSION,\n },\n deviceConfig: {\n message: AuthErrorStrings_1.AuthErrorStrings.DEVICE_CONFIG,\n },\n networkError: {\n message: AuthErrorStrings_1.AuthErrorStrings.NETWORK_ERROR,\n },\n autoSignInError: {\n message: AuthErrorStrings_1.AuthErrorStrings.AUTOSIGNIN_ERROR,\n },\n default: {\n message: AuthErrorStrings_1.AuthErrorStrings.DEFAULT_MSG,\n },\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,SAAS,GAAG,MAAM;AAChF;AACA,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,kBAAkB,GAAG,OAAO,CAAC,2BAA2B,CAAC;AAC/D,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC;AACpD,MAAM,SAAS,SAAS,KAAK,CAAC;AAC9B,IAAI,WAAW,CAAC,IAAI,EAAE;AACtB,Q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CAAC,gBAAgB;AACrE,KAAK;AACL,IAAI,OAAO,EAAE;AACb,QAAQ,OAAO,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,WAAW;AAChE,KAAK;AACL,CAAC;;"}
1
+ {"version":3,"file":"Errors.js","sources":["../../src/Errors.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.authErrorMessages = exports.NoUserPoolError = exports.AuthError = void 0;\n// TODO: delete this module when the Auth class is removed.\nconst core_1 = require(\"@aws-amplify/core\");\nconst AuthErrorStrings_1 = require(\"./common/AuthErrorStrings\");\nconst logger = new core_1.ConsoleLogger('AuthError');\nclass AuthError extends Error {\n constructor(type) {\n const { message, log } = exports.authErrorMessages[type];\n super(message);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AuthError;\n Object.setPrototypeOf(this, AuthError.prototype);\n this.name = 'AuthError';\n this.log = log || message;\n logger.error(this.log);\n }\n}\nexports.AuthError = AuthError;\nclass NoUserPoolError extends AuthError {\n constructor(type) {\n super(type);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = NoUserPoolError;\n Object.setPrototypeOf(this, NoUserPoolError.prototype);\n this.name = 'NoUserPoolError';\n }\n}\nexports.NoUserPoolError = NoUserPoolError;\nexports.authErrorMessages = {\n oauthSignInError: {\n message: AuthErrorStrings_1.AuthErrorStrings.OAUTH_ERROR,\n log: 'Make sure Cognito Hosted UI has been configured correctly',\n },\n noConfig: {\n message: AuthErrorStrings_1.AuthErrorStrings.DEFAULT_MSG,\n log: `\n Error: Amplify has not been configured correctly.\n This error is typically caused by one of the following scenarios:\n\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n \n 2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n `,\n },\n missingAuthConfig: {\n message: AuthErrorStrings_1.AuthErrorStrings.DEFAULT_MSG,\n log: `\n Error: Amplify has not been configured correctly. \n The configuration object is missing required auth properties.\n This error is typically caused by one of the following scenarios:\n\n 1. Did you run \\`amplify push\\` after adding auth via \\`amplify add auth\\`?\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n 2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.\n `,\n },\n emptyUsername: {\n message: AuthErrorStrings_1.AuthErrorStrings.EMPTY_USERNAME,\n },\n // TODO: should include a list of valid sign-in types\n invalidUsername: {\n message: AuthErrorStrings_1.AuthErrorStrings.INVALID_USERNAME,\n },\n emptyPassword: {\n message: AuthErrorStrings_1.AuthErrorStrings.EMPTY_PASSWORD,\n },\n emptyCode: {\n message: AuthErrorStrings_1.AuthErrorStrings.EMPTY_CODE,\n },\n signUpError: {\n message: AuthErrorStrings_1.AuthErrorStrings.SIGN_UP_ERROR,\n log: 'The first parameter should either be non-null string or object',\n },\n noMFA: {\n message: AuthErrorStrings_1.AuthErrorStrings.NO_MFA,\n },\n invalidMFA: {\n message: AuthErrorStrings_1.AuthErrorStrings.INVALID_MFA,\n },\n emptyChallengeResponse: {\n message: AuthErrorStrings_1.AuthErrorStrings.EMPTY_CHALLENGE,\n },\n noUserSession: {\n message: AuthErrorStrings_1.AuthErrorStrings.NO_USER_SESSION,\n },\n deviceConfig: {\n message: AuthErrorStrings_1.AuthErrorStrings.DEVICE_CONFIG,\n },\n networkError: {\n message: AuthErrorStrings_1.AuthErrorStrings.NETWORK_ERROR,\n },\n autoSignInError: {\n message: AuthErrorStrings_1.AuthErrorStrings.AUTOSIGNIN_ERROR,\n },\n default: {\n message: AuthErrorStrings_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AAO,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,WAAW;AAChE,KAAK;AACL,IAAI,sBAAsB,EAAE;AAC5B,QAAQ,OAAO,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,eAAe;AACpE,KAAK;AACL,IAAI,aAAa,EAAE;AACnB,QAAQ,OAAO,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,eAAe;AACpE,KAAK;AACL,IAAI,YAAY,EAAE;AAClB,QAAQ,OAAO,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,aAAa;AAClE,KAAK;AACL,IAAI,YAAY,EAAE;AAClB,QAAQ,OAAO,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,aAAa;AAClE,KAAK;AACL,IAAI,eAAe,EAAE;AACrB,QAAQ,OAAO,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,gBAAgB;AACrE,KAAK;AACL,IAAI,OAAO,EAAE;AACb,QAAQ,OAAO,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,WAAW;AAChE,KAAK;AACL,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/client/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deleteWebAuthnCredential = exports.listWebAuthnCredentials = exports.associateWebAuthnCredential = void 0;\nvar associateWebAuthnCredential_1 = require(\"./associateWebAuthnCredential\");\nObject.defineProperty(exports, \"associateWebAuthnCredential\", { enumerable: true, get: function () { return associateWebAuthnCredential_1.associateWebAuthnCredential; } });\nvar listWebAuthnCredentials_1 = require(\"./listWebAuthnCredentials\");\nObject.defineProperty(exports, \"listWebAuthnCredentials\", { enumerable: true, get: function () { return listWebAuthnCredentials_1.listWebAuthnCredentials; } });\nvar deleteWebAuthnCredential_1 = require(\"./deleteWebAuthnCredential\");\nObject.defineProperty(exports, \"deleteWebAuthnCredential\", { enumerable: true, get: function () { return deleteWebAuthnCredential_1.deleteWebAuthnCredential; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,uBAAuB,GAAG,OAAO,CAAC,2BAA2B,GAAG,MAAM;AACjH,IAAI,6BAA6B,GAAG,OAAO,CAAC,+BAA+B,CAAC;AAC5E,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,6BAA6B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,6BAA6B,CAAC,2BAA2B,CAAC,EAAE,EAAE,CAAC;AAC3K,IAAI,yBAAyB,GAAG,OAAO,CAAC,2BAA2B,CAAC;AACpE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,yBAAyB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,yBAAyB,CAAC,uBAAuB,CAAC,EAAE,EAAE,CAAC;AAC/J,IAAI,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC;AACtE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,0BAA0B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,0BAA0B,CAAC,wBAAwB,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/client/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deleteWebAuthnCredential = exports.listWebAuthnCredentials = exports.associateWebAuthnCredential = void 0;\nvar associateWebAuthnCredential_1 = require(\"./associateWebAuthnCredential\");\nObject.defineProperty(exports, \"associateWebAuthnCredential\", { enumerable: true, get: function () { return associateWebAuthnCredential_1.associateWebAuthnCredential; } });\nvar listWebAuthnCredentials_1 = require(\"./listWebAuthnCredentials\");\nObject.defineProperty(exports, \"listWebAuthnCredentials\", { enumerable: true, get: function () { return listWebAuthnCredentials_1.listWebAuthnCredentials; } });\nvar deleteWebAuthnCredential_1 = require(\"./deleteWebAuthnCredential\");\nObject.defineProperty(exports, \"deleteWebAuthnCredential\", { enumerable: true, get: function () { return deleteWebAuthnCredential_1.deleteWebAuthnCredential; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,uBAAuB,GAAG,OAAO,CAAC,2BAA2B,GAAG,MAAM;AACjH,IAAI,6BAA6B,GAAG,OAAO,CAAC,+BAA+B,CAAC;AAC5E,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,6BAA6B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,6BAA6B,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3K,IAAI,yBAAyB,GAAG,OAAO,CAAC,2BAA2B,CAAC;AACpE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,yBAAyB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,yBAAyB,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/J,IAAI,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC;AACtE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,0BAA0B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,0BAA0B,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"handlePasswordSRP.js","sources":["../../../../../src/client/flows/shared/handlePasswordSRP.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handlePasswordSRP = handlePasswordSRP;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst userContextData_1 = require(\"../../../providers/cognito/utils/userContextData\");\nconst srp_1 = require(\"../../../providers/cognito/utils/srp\");\nconst cognitoIdentityProvider_1 = require(\"../../../foundation/factories/serviceClients/cognitoIdentityProvider\");\nconst factories_1 = require(\"../../../providers/cognito/factories\");\nconst parsers_1 = require(\"../../../foundation/parsers\");\nconst utils_2 = require(\"../../../utils\");\nconst handlePasswordVerifierChallenge_1 = require(\"../../../providers/cognito/utils/handlePasswordVerifierChallenge\");\nconst retryOnResourceNotFoundException_1 = require(\"../../../providers/cognito/utils/retryOnResourceNotFoundException\");\nconst setActiveSignInUsername_1 = require(\"../../../providers/cognito/utils/setActiveSignInUsername\");\n/**\n * Handles the Password SRP (Secure Remote Password) authentication flow.\n * This function can be used with both USER_SRP_AUTH and USER_AUTH flows.\n *\n * @param {Object} params - The parameters for the Password SRP authentication\n * @param {string} params.username - The username for authentication\n * @param {string} params.password - The user's password\n * @param {ClientMetadata} [params.clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {AuthTokenOrchestrator} params.tokenOrchestrator - Token orchestrator for managing auth tokens\n * @param {AuthFlowType} params.authFlow - The type of authentication flow ('USER_SRP_AUTH' or 'USER_AUTH')\n * @param {AuthFactorType} [params.preferredChallenge] - Optional preferred challenge type when using USER_AUTH flow\n *\n * @returns {Promise<RespondToAuthChallengeCommandOutput>} The authentication response\n */\nasync function handlePasswordSRP({ username, password, clientMetadata, config, tokenOrchestrator, authFlow, preferredChallenge, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const authenticationHelper = await (0, srp_1.getAuthenticationHelper)(userPoolName);\n const authParameters = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n };\n if (authFlow === 'USER_AUTH' && preferredChallenge) {\n authParameters.PREFERRED_CHALLENGE = preferredChallenge;\n }\n const UserContextData = (0, userContextData_1.getUserContextData)({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: authFlow,\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = (0, cognitoIdentityProvider_1.createInitiateAuthClient)({\n endpointResolver: (0, factories_1.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const resp = await initiateAuth({\n region: (0, parsers_1.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, utils_2.getAuthUserAgentValue)(utils_1.AuthAction.SignIn),\n }, jsonReq);\n const { ChallengeParameters: challengeParameters, Session: session } = resp;\n const activeUsername = challengeParameters?.USERNAME ?? username;\n (0, setActiveSignInUsername_1.setActiveSignInUsername)(activeUsername);\n if (resp.ChallengeName === 'PASSWORD_VERIFIER') {\n return (0, retryOnResourceNotFoundException_1.retryOnResourceNotFoundException)(handlePasswordVerifierChallenge_1.handlePasswordVerifierChallenge, [\n password,\n challengeParameters,\n clientMetadata,\n session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n }\n return resp;\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;AAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,iBAAiB,GAAG,OAAO,CAAC,kDAAkD,CAAC;AACrF,MAAM,KAAK,GAAG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"}
1
+ {"version":3,"file":"handlePasswordSRP.js","sources":["../../../../../src/client/flows/shared/handlePasswordSRP.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handlePasswordSRP = handlePasswordSRP;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst userContextData_1 = require(\"../../../providers/cognito/utils/userContextData\");\nconst srp_1 = require(\"../../../providers/cognito/utils/srp\");\nconst cognitoIdentityProvider_1 = require(\"../../../foundation/factories/serviceClients/cognitoIdentityProvider\");\nconst factories_1 = require(\"../../../providers/cognito/factories\");\nconst parsers_1 = require(\"../../../foundation/parsers\");\nconst utils_2 = require(\"../../../utils\");\nconst handlePasswordVerifierChallenge_1 = require(\"../../../providers/cognito/utils/handlePasswordVerifierChallenge\");\nconst retryOnResourceNotFoundException_1 = require(\"../../../providers/cognito/utils/retryOnResourceNotFoundException\");\nconst setActiveSignInUsername_1 = require(\"../../../providers/cognito/utils/setActiveSignInUsername\");\n/**\n * Handles the Password SRP (Secure Remote Password) authentication flow.\n * This function can be used with both USER_SRP_AUTH and USER_AUTH flows.\n *\n * @param {Object} params - The parameters for the Password SRP authentication\n * @param {string} params.username - The username for authentication\n * @param {string} params.password - The user's password\n * @param {ClientMetadata} [params.clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {AuthTokenOrchestrator} params.tokenOrchestrator - Token orchestrator for managing auth tokens\n * @param {AuthFlowType} params.authFlow - The type of authentication flow ('USER_SRP_AUTH' or 'USER_AUTH')\n * @param {AuthFactorType} [params.preferredChallenge] - Optional preferred challenge type when using USER_AUTH flow\n *\n * @returns {Promise<RespondToAuthChallengeCommandOutput>} The authentication response\n */\nasync function handlePasswordSRP({ username, password, clientMetadata, config, tokenOrchestrator, authFlow, preferredChallenge, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const authenticationHelper = await (0, srp_1.getAuthenticationHelper)(userPoolName);\n const authParameters = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n };\n if (authFlow === 'USER_AUTH' && preferredChallenge) {\n authParameters.PREFERRED_CHALLENGE = preferredChallenge;\n }\n const UserContextData = (0, userContextData_1.getUserContextData)({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: authFlow,\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = (0, cognitoIdentityProvider_1.createInitiateAuthClient)({\n endpointResolver: (0, factories_1.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const resp = await initiateAuth({\n region: (0, parsers_1.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, utils_2.getAuthUserAgentValue)(utils_1.AuthAction.SignIn),\n }, jsonReq);\n const { ChallengeParameters: challengeParameters, Session: session } = resp;\n const activeUsername = challengeParameters?.USERNAME ?? username;\n (0, setActiveSignInUsername_1.setActiveSignInUsername)(activeUsername);\n if (resp.ChallengeName === 'PASSWORD_VERIFIER') {\n return (0, retryOnResourceNotFoundException_1.retryOnResourceNotFoundException)(handlePasswordVerifierChallenge_1.handlePasswordVerifierChallenge, [\n password,\n challengeParameters,\n clientMetadata,\n session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n }\n return resp;\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;AAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,iBAAiB,GAAG,OAAO,CAAC,kDAAkD,CAAC;AAC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AAI;AACJ,IAAI,OAAO,IAAI;AACf;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"handleSelectChallengeWithPasswordSRP.js","sources":["../../../../../src/client/flows/userAuth/handleSelectChallengeWithPasswordSRP.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handleSelectChallengeWithPasswordSRP = handleSelectChallengeWithPasswordSRP;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst cognitoIdentityProvider_1 = require(\"../../../foundation/factories/serviceClients/cognitoIdentityProvider\");\nconst factories_1 = require(\"../../../providers/cognito/factories\");\nconst parsers_1 = require(\"../../../foundation/parsers\");\nconst utils_2 = require(\"../../../utils\");\nconst srp_1 = require(\"../../../providers/cognito/utils/srp\");\nconst userContextData_1 = require(\"../../../providers/cognito/utils/userContextData\");\nconst setActiveSignInUsername_1 = require(\"../../../providers/cognito/utils/setActiveSignInUsername\");\nconst retryOnResourceNotFoundException_1 = require(\"../../../providers/cognito/utils/retryOnResourceNotFoundException\");\nconst handlePasswordVerifierChallenge_1 = require(\"../../../providers/cognito/utils/handlePasswordVerifierChallenge\");\n/**\n * Handles the SELECT_CHALLENGE response specifically for Password SRP authentication.\n * This function combines the SELECT_CHALLENGE flow with Password SRP protocol.\n *\n * @param {string} username - The username for authentication\n * @param {string} password - The user's password\n * @param {ClientMetadata} [clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} config - Cognito User Pool configuration\n * @param {string} session - The current authentication session token\n * @param {AuthTokenOrchestrator} tokenOrchestrator - Token orchestrator for managing auth tokens\n *\n * @returns {Promise<RespondToAuthChallengeCommandOutput>} The challenge response\n */\nasync function handleSelectChallengeWithPasswordSRP(username, password, clientMetadata, config, session, tokenOrchestrator) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId.split('_')[1] || '';\n const authenticationHelper = await (0, srp_1.getAuthenticationHelper)(userPoolName);\n const authParameters = {\n ANSWER: 'PASSWORD_SRP',\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n };\n const userContextData = (0, userContextData_1.getUserContextData)({\n username,\n userPoolId,\n userPoolClientId,\n });\n const respondToAuthChallenge = (0, cognitoIdentityProvider_1.createRespondToAuthChallengeClient)({\n endpointResolver: (0, factories_1.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({\n region: (0, parsers_1.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, utils_2.getAuthUserAgentValue)(utils_1.AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: authParameters,\n ClientId: userPoolClientId,\n ClientMetadata: clientMetadata,\n Session: session,\n UserContextData: userContextData,\n });\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n (0, setActiveSignInUsername_1.setActiveSignInUsername)(activeUsername);\n if (response.ChallengeName === 'PASSWORD_VERIFIER') {\n return (0, retryOnResourceNotFoundException_1.retryOnResourceNotFoundException)(handlePasswordVerifierChallenge_1.handlePasswordVerifierChallenge, [\n password,\n response.ChallengeParameters,\n clientMetadata,\n response.Session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n }\n return response;\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oCAAoC,GAAG,oCAAoC;AACnF,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,yBAAyB,GAAG,OAAO,CAAC,sEAAsE,CAAC;AACjH,MAAM,WAAW,GAAG,OAAO,CAAC,sCAAsC,CAAC;AACnE,MAAM,SAAS,GAAG,OAAO,CAAC,6BAA6B,CAA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AAC9C,SAAS,CAAC;AACV,KAAK,CAAC;AACN,IAAI,MAAM,QAAQ,GAAG,MAAM,sBAAsB,CAAC;AAClD,QAAQ,MAAM,EAAE,IAAI,SAAS,CAAC,uBAAuB,EAAE,UAAU,CAAC;AAClE,QAAQ,cAAc,EAAE,IAAI,OAAO,CAAC,qBAAqB,EAAE,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;AAC5F,KAAK,EAAE;AACP,QAAQ,aAAa,EAAE,kBAAkB;AACzC,QAAQ,kBAAkB,EAAE,cAAc;AAC1C,QAAQ,QAAQ,EAAE,gBAAgB;AAClC,QAAQ,cAAc,EAAE,cAAc;AACtC,QAAQ,OAAO,EAAE,OAAO;AACxB,QAAQ,eAAe,EAAE,eAAe;AACxC,KAAK,CAAC;AACN,IAAI,MAAM,cAAc,GAAG,QAAQ,CAAC,mBAAmB,EAAE,QAAQ,IAAI,QAAQ;AAC7E,IAAI,IAAI,yBAAyB,CAAC,uBAAuB,EAAE,cAAc,CAAC;AAC1E,IAAI,IAAI,QAAQ,CAAC,aAAa,KAAK,mBAAmB,EAAE;AACxD,QAAQ,OAAO,IAAI,kCAAkC,CAAC,gCAAgC,EAAE,iCAAiC,CAAC,+BAA+B,EAAE;AAC3J,YAAY,QAAQ;AACpB,YAAY,QAAQ,CAAC,mBAAmB;AACxC,YAAY,cAAc;AAC1B,YAAY,QAAQ,CAAC,OAAO;AAC5B,YAAY,oBAAoB;AAChC,YAAY,MAAM;AAClB,YAAY,iBAAiB;AAC7B,SAAS,EAAE,cAAc,EAAE,iBAAiB,CAAC;AAC7C;AACA,IAAI,OAAO,QAAQ;AACnB;;"}
1
+ {"version":3,"file":"handleSelectChallengeWithPasswordSRP.js","sources":["../../../../../src/client/flows/userAuth/handleSelectChallengeWithPasswordSRP.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handleSelectChallengeWithPasswordSRP = handleSelectChallengeWithPasswordSRP;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst cognitoIdentityProvider_1 = require(\"../../../foundation/factories/serviceClients/cognitoIdentityProvider\");\nconst factories_1 = require(\"../../../providers/cognito/factories\");\nconst parsers_1 = require(\"../../../foundation/parsers\");\nconst utils_2 = require(\"../../../utils\");\nconst srp_1 = require(\"../../../providers/cognito/utils/srp\");\nconst userContextData_1 = require(\"../../../providers/cognito/utils/userContextData\");\nconst setActiveSignInUsername_1 = require(\"../../../providers/cognito/utils/setActiveSignInUsername\");\nconst retryOnResourceNotFoundException_1 = require(\"../../../providers/cognito/utils/retryOnResourceNotFoundException\");\nconst handlePasswordVerifierChallenge_1 = require(\"../../../providers/cognito/utils/handlePasswordVerifierChallenge\");\n/**\n * Handles the SELECT_CHALLENGE response specifically for Password SRP authentication.\n * This function combines the SELECT_CHALLENGE flow with Password SRP protocol.\n *\n * @param {string} username - The username for authentication\n * @param {string} password - The user's password\n * @param {ClientMetadata} [clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} config - Cognito User Pool configuration\n * @param {string} session - The current authentication session token\n * @param {AuthTokenOrchestrator} tokenOrchestrator - Token orchestrator for managing auth tokens\n *\n * @returns {Promise<RespondToAuthChallengeCommandOutput>} The challenge response\n */\nasync function handleSelectChallengeWithPasswordSRP(username, password, clientMetadata, config, session, tokenOrchestrator) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId.split('_')[1] || '';\n const authenticationHelper = await (0, srp_1.getAuthenticationHelper)(userPoolName);\n const authParameters = {\n ANSWER: 'PASSWORD_SRP',\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n };\n const userContextData = (0, userContextData_1.getUserContextData)({\n username,\n userPoolId,\n userPoolClientId,\n });\n const respondToAuthChallenge = (0, cognitoIdentityProvider_1.createRespondToAuthChallengeClient)({\n endpointResolver: (0, factories_1.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({\n region: (0, parsers_1.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, utils_2.getAuthUserAgentValue)(utils_1.AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: authParameters,\n ClientId: userPoolClientId,\n ClientMetadata: clientMetadata,\n Session: session,\n UserContextData: userContextData,\n });\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n (0, setActiveSignInUsername_1.setActiveSignInUsername)(activeUsername);\n if (response.ChallengeName === 'PASSWORD_VERIFIER') {\n return (0, retryOnResourceNotFoundException_1.retryOnResourceNotFoundException)(handlePasswordVerifierChallenge_1.handlePasswordVerifierChallenge, [\n password,\n response.ChallengeParameters,\n clientMetadata,\n response.Session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n }\n return response;\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oCAAoC,GAAG,oCAAoC;AACnF,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,yBAAyB,GAAG,OAAO,CAAC,sEAAsE,CAAC;AACjH,MAAM,WAAW,GAAG,OAAO,CAAC,sCAAsC,CAAC;AACnE,MAAM,SAAS,GAAG,OAAO,CAAC,6BAA6B,CAAC;AACxD,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,KAAK,GAAG,OAAO,CAAC,sCAAsC,CAAC;AAC7D,MAAM,iBAAiB,GAAG,OAAO,CAAC,kDAAkD,CAAC;AACrF,MAAM,yBAAyB,GAAG,OAAO,CAAC,0DAA0D,CAAC;AACrG,MAAM,kCAAkC,GAAG,OAAO,CAAC,mEAAmE,CAAC;AACvH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;AACP,QAAQ,aAAa,EAAE,kBAAkB;AACzC,QAAQ,kBAAkB,EAAE,cAAc;AAC1C,QAAQ,QAAQ,EAAE,gBAAgB;AAClC,QAAQ,cAAc,EAAE,cAAc;AACtC,QAAQ,OAAO,EAAE,OAAO;AACxB,QAAQ,eAAe,EAAE,eAAe;AACxC,KAAK,CAAC;AACN,IAAI,MAAM,cAAc,GAAG,QAAQ,CAAC,mBAAmB,EAAE,QAAQ,IAAI,QAAQ;AAC7E,IAAI,IAAI,yBAAyB,CAAC,uBAAuB,EAAE,cAAc,CAAC;AAC1E,IAAI,IAAI,QAAQ,CAAC,aAAa,KAAK,mBAAmB,EAAE;AACxD,QAAQ,OAAO,IAAI,kCAAkC,CAAC,gCAAgC,EAAE,iCAAiC,CAAC,+BAA+B,EAAE;AAC3J,YAAY,QAAQ;AACpB,YAAY,QAAQ,CAAC,mBAAmB;AACxC,YAAY,cAAc;AAC1B,YAAY,QAAQ,CAAC,OAAO;AAC5B,YAAY,oBAAoB;AAChC,YAAY,MAAM;AAClB,YAAY,iBAAiB;AAC7B,SAAS,EAAE,cAAc,EAAE,iBAAiB,CAAC;AAC7C,IAAI;AACJ,IAAI,OAAO,QAAQ;AACnB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"handleUserAuthFlow.js","sources":["../../../../../src/client/flows/userAuth/handleUserAuthFlow.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handleUserAuthFlow = handleUserAuthFlow;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst userContextData_1 = require(\"../../../providers/cognito/utils/userContextData\");\nconst cognitoIdentityProvider_1 = require(\"../../../foundation/factories/serviceClients/cognitoIdentityProvider\");\nconst factories_1 = require(\"../../../providers/cognito/factories\");\nconst parsers_1 = require(\"../../../foundation/parsers\");\nconst utils_2 = require(\"../../../utils\");\nconst handlePasswordSRP_1 = require(\"../shared/handlePasswordSRP\");\nconst assertValidationError_1 = require(\"../../../errors/utils/assertValidationError\");\nconst validation_1 = require(\"../../../errors/types/validation\");\nconst setActiveSignInUsername_1 = require(\"../../../providers/cognito/utils/setActiveSignInUsername\");\n/**\n * Handles user authentication flow with configurable challenge preferences.\n * Supports AuthFactorType challenges through the USER_AUTH flow.\n *\n * @param {HandleUserAuthFlowInput} params - Authentication flow parameters\n * @param {string} params.username - The username for authentication\n * @param {Record<string, string>} [params.clientMetadata] - Optional metadata to pass to authentication service\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {AuthTokenOrchestrator} params.tokenOrchestrator - Manages authentication tokens and device tracking\n * @param {AuthFactorType} [params.preferredChallenge] - Optional preferred authentication method\n * @param {string} [params.password] - Required when preferredChallenge is 'PASSWORD' or 'PASSWORD_SRP'\n *\n * @returns {Promise<InitiateAuthCommandOutput>} The authentication response from Cognito\n */\nasync function handleUserAuthFlow({ username, clientMetadata, config, tokenOrchestrator, preferredChallenge, password, session, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const UserContextData = (0, userContextData_1.getUserContextData)({\n username,\n userPoolId,\n userPoolClientId,\n });\n const authParameters = { USERNAME: username };\n if (preferredChallenge) {\n if (preferredChallenge === 'PASSWORD_SRP') {\n (0, assertValidationError_1.assertValidationError)(!!password, validation_1.AuthValidationErrorCode.EmptySignInPassword);\n return (0, handlePasswordSRP_1.handlePasswordSRP)({\n username,\n password,\n clientMetadata,\n config,\n tokenOrchestrator,\n authFlow: 'USER_AUTH',\n preferredChallenge,\n });\n }\n if (preferredChallenge === 'PASSWORD') {\n (0, assertValidationError_1.assertValidationError)(!!password, validation_1.AuthValidationErrorCode.EmptySignInPassword);\n authParameters.PASSWORD = password;\n }\n authParameters.PREFERRED_CHALLENGE = preferredChallenge;\n }\n const jsonReq = {\n AuthFlow: 'USER_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n if (session) {\n jsonReq.Session = session;\n }\n const initiateAuth = (0, cognitoIdentityProvider_1.createInitiateAuthClient)({\n endpointResolver: (0, factories_1.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await initiateAuth({\n region: (0, parsers_1.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, utils_2.getAuthUserAgentValue)(utils_1.AuthAction.SignIn),\n }, jsonReq);\n // Set the active username immediately after successful authentication attempt\n // If a user starts a new sign-in while another sign-in is incomplete,\n // this ensures we're tracking the correct user for subsequent auth challenges.\n (0, setActiveSignInUsername_1.setActiveSignInUsername)(username);\n return response;\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,iBAAiB,GAAG,OAAO,CAAC,kDAAkD,CAAC;AACrF,MAAM,yBAAyB,GAAG,OAAO,CAAC,sEAAsE,CAAC;AACjH,MAAM,WAAW,GAAG,OAAO,CAAC,sCAAsC,CAAC;AACnE,MAAM,SAAS,GAAG,OAAO,CAAC,6BAA6B,CAAC;AACxD,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,mBAAmB,GAAG,OAAO,CAAC,6BAA6B,CAAC;AAClE,MAAM,uBAAuB,GAAG,OAAO,CAAC,6CAA6C,CAAC;AACtF,MAAM,YAAY,GAAG,OAAO,CAAC,kCAAkC,CAAC;AAChE,MAAM,yBAAyB,GAAG,OAAO,CAAC,0DAA0D,CAAC;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,CAAC,EAAE,QAAQ,EAAE,cAAc,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,eAAe;AACvB,KAAK;AACL,IAAI,IAAI,OAAO,EAAE;AACjB,QAAQ,OAAO,CAAC,OAAO,GAAG,OAAO;AACjC;AACA,IAAI,MAAM,YAAY,GAAG,IAAI,yBAAyB,CAAC,wBAAwB,EAAE;AACjF,QAAQ,gBAAgB,EAAE,IAAI,WAAW,CAAC,qCAAqC,EAAE;AACjF,YAAY,gBAAgB,EAAE,gBAAgB;AAC9C,SAAS,CAAC;AACV,KAAK,CAAC;AACN,IAAI,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC;AACxC,QAAQ,MAAM,EAAE,IAAI,SAAS,CAAC,uBAAuB,EAAE,UAAU,CAAC;AAClE,QAAQ,cAAc,EAAE,IAAI,OAAO,CAAC,qBAAqB,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;AACrF,KAAK,EAAE,OAAO,CAAC;AACf;AACA;AACA;AACA,IAAI,IAAI,yBAAyB,CAAC,uBAAuB,EAAE,QAAQ,CAAC;AACpE,IAAI,OAAO,QAAQ;AACnB;;"}
1
+ {"version":3,"file":"handleUserAuthFlow.js","sources":["../../../../../src/client/flows/userAuth/handleUserAuthFlow.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handleUserAuthFlow = handleUserAuthFlow;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst userContextData_1 = require(\"../../../providers/cognito/utils/userContextData\");\nconst cognitoIdentityProvider_1 = require(\"../../../foundation/factories/serviceClients/cognitoIdentityProvider\");\nconst factories_1 = require(\"../../../providers/cognito/factories\");\nconst parsers_1 = require(\"../../../foundation/parsers\");\nconst utils_2 = require(\"../../../utils\");\nconst handlePasswordSRP_1 = require(\"../shared/handlePasswordSRP\");\nconst assertValidationError_1 = require(\"../../../errors/utils/assertValidationError\");\nconst validation_1 = require(\"../../../errors/types/validation\");\nconst setActiveSignInUsername_1 = require(\"../../../providers/cognito/utils/setActiveSignInUsername\");\n/**\n * Handles user authentication flow with configurable challenge preferences.\n * Supports AuthFactorType challenges through the USER_AUTH flow.\n *\n * @param {HandleUserAuthFlowInput} params - Authentication flow parameters\n * @param {string} params.username - The username for authentication\n * @param {Record<string, string>} [params.clientMetadata] - Optional metadata to pass to authentication service\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {AuthTokenOrchestrator} params.tokenOrchestrator - Manages authentication tokens and device tracking\n * @param {AuthFactorType} [params.preferredChallenge] - Optional preferred authentication method\n * @param {string} [params.password] - Required when preferredChallenge is 'PASSWORD' or 'PASSWORD_SRP'\n *\n * @returns {Promise<InitiateAuthCommandOutput>} The authentication response from Cognito\n */\nasync function handleUserAuthFlow({ username, clientMetadata, config, tokenOrchestrator, preferredChallenge, password, session, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const UserContextData = (0, userContextData_1.getUserContextData)({\n username,\n userPoolId,\n userPoolClientId,\n });\n const authParameters = { USERNAME: username };\n if (preferredChallenge) {\n if (preferredChallenge === 'PASSWORD_SRP') {\n (0, assertValidationError_1.assertValidationError)(!!password, validation_1.AuthValidationErrorCode.EmptySignInPassword);\n return (0, handlePasswordSRP_1.handlePasswordSRP)({\n username,\n password,\n clientMetadata,\n config,\n tokenOrchestrator,\n authFlow: 'USER_AUTH',\n preferredChallenge,\n });\n }\n if (preferredChallenge === 'PASSWORD') {\n (0, assertValidationError_1.assertValidationError)(!!password, validation_1.AuthValidationErrorCode.EmptySignInPassword);\n authParameters.PASSWORD = password;\n }\n authParameters.PREFERRED_CHALLENGE = preferredChallenge;\n }\n const jsonReq = {\n AuthFlow: 'USER_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n if (session) {\n jsonReq.Session = session;\n }\n const initiateAuth = (0, cognitoIdentityProvider_1.createInitiateAuthClient)({\n endpointResolver: (0, factories_1.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await initiateAuth({\n region: (0, parsers_1.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, utils_2.getAuthUserAgentValue)(utils_1.AuthAction.SignIn),\n }, jsonReq);\n // Set the active username immediately after successful authentication attempt\n // If a user starts a new sign-in while another sign-in is incomplete,\n // this ensures we're tracking the correct user for subsequent auth challenges.\n (0, setActiveSignInUsername_1.setActiveSignInUsername)(username);\n return response;\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,iBAAiB,GAAG,OAAO,CAAC,kDAAkD,CAAC;AACrF,MAAM,yBAAyB,GAAG,OAAO,CAAC,sEAAsE,CAAC;AACjH,MAAM,WAAW,GAAG,OAAO,CAAC,sCAAsC,CAAC;AACnE,MAAM,SAAS,GAAG,OAAO,CAAC,6BAA6B,CAAC;AACxD,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,mBAAmB,GAAG,OAAO,CAAC,6BAA6B,CAAC;AAClE,MAAM,uBAAuB,GAAG,OAAO,CAAC,6CAA6C,CAAC;AACtF,MAAM,YAAY,GAAG,OAAO,CAAC,kCAAkC,CAAC;AAChE,MAAM,yBAAyB,GAAG,OAAO,CAAC,0DAA0D,CAAC;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,OAAO,GAAG,EAAE;AACnI,IAAI,MAAM,EAAE,UAAU,EAAE,gBAAgB,E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;AACJ,IAAI,MAAM,YAAY,GAAG,IAAI,yBAAyB,CAAC,wBAAwB,EAAE;AACjF,QAAQ,gBAAgB,EAAE,IAAI,WAAW,CAAC,qCAAqC,EAAE;AACjF,YAAY,gBAAgB,EAAE,gBAAgB;AAC9C,SAAS,CAAC;AACV,KAAK,CAAC;AACN,IAAI,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC;AACxC,QAAQ,MAAM,EAAE,IAAI,SAAS,CAAC,uBAAuB,EAAE,UAAU,CAAC;AAClE,QAAQ,cAAc,EAAE,IAAI,OAAO,CAAC,qBAAqB,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;AACrF,KAAK,EAAE,OAAO,CAAC;AACf;AACA;AACA;AACA,IAAI,IAAI,yBAAyB,CAAC,uBAAuB,EAAE,QAAQ,CAAC;AACpE,IAAI,OAAO,QAAQ;AACnB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"handleWebAuthnSignInResult.js","sources":["../../../../../src/client/flows/userAuth/handleWebAuthnSignInResult.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handleWebAuthnSignInResult = handleWebAuthnSignInResult;\nconst core_1 = require(\"@aws-amplify/core\");\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst AuthErrorStrings_1 = require(\"../../../common/AuthErrorStrings\");\nconst cognitoIdentityProvider_1 = require(\"../../../foundation/factories/serviceClients/cognitoIdentityProvider\");\nconst parsers_1 = require(\"../../../foundation/parsers\");\nconst factories_1 = require(\"../../../providers/cognito/factories\");\nconst cacheTokens_1 = require(\"../../../providers/cognito/tokenProvider/cacheTokens\");\nconst dispatchSignedInHubEvent_1 = require(\"../../../providers/cognito/utils/dispatchSignedInHubEvent\");\nconst store_1 = require(\"../../../client/utils/store\");\nconst utils_2 = require(\"../../../utils\");\nconst passkey_1 = require(\"../../utils/passkey\");\nconst errors_1 = require(\"../../utils/passkey/errors\");\nconst AuthError_1 = require(\"../../../errors/AuthError\");\nconst getNewDeviceMetadata_1 = require(\"../../../providers/cognito/utils/getNewDeviceMetadata\");\nasync function handleWebAuthnSignInResult(challengeParameters) {\n const authConfig = core_1.Amplify.getConfig().Auth?.Cognito;\n (0, utils_1.assertTokenProviderConfig)(authConfig);\n const { username, signInSession, signInDetails, challengeName } = store_1.signInStore.getState();\n if (challengeName !== 'WEB_AUTHN' || !username) {\n throw new AuthError_1.AuthError({\n name: AuthErrorStrings_1.AuthErrorCodes.SignInException,\n message: 'Unable to proceed due to invalid sign in state.',\n });\n }\n const { CREDENTIAL_REQUEST_OPTIONS: credentialRequestOptions } = challengeParameters;\n (0, errors_1.assertPasskeyError)(!!credentialRequestOptions, errors_1.PasskeyErrorCode.InvalidPasskeyAuthenticationOptions);\n const cred = await (0, passkey_1.getPasskey)(JSON.parse(credentialRequestOptions));\n const respondToAuthChallenge = (0, cognitoIdentityProvider_1.createRespondToAuthChallengeClient)({\n endpointResolver: (0, factories_1.createCognitoUserPoolEndpointResolver)({\n endpointOverride: authConfig.userPoolEndpoint,\n }),\n });\n const { ChallengeName: nextChallengeName, ChallengeParameters: nextChallengeParameters, AuthenticationResult: authenticationResult, Session: nextSession, } = await respondToAuthChallenge({\n region: (0, parsers_1.getRegionFromUserPoolId)(authConfig.userPoolId),\n userAgentValue: (0, utils_2.getAuthUserAgentValue)(utils_1.AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'WEB_AUTHN',\n ChallengeResponses: {\n USERNAME: username,\n CREDENTIAL: JSON.stringify(cred),\n },\n ClientId: authConfig.userPoolClientId,\n Session: signInSession,\n });\n (0, store_1.setActiveSignInState)({\n signInSession: nextSession,\n username,\n challengeName: nextChallengeName,\n signInDetails,\n });\n if (authenticationResult) {\n await (0, cacheTokens_1.cacheCognitoTokens)({\n ...authenticationResult,\n username,\n NewDeviceMetadata: await (0, getNewDeviceMetadata_1.getNewDeviceMetadata)({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: authenticationResult.NewDeviceMetadata,\n accessToken: authenticationResult.AccessToken,\n }),\n signInDetails,\n });\n store_1.signInStore.dispatch({ type: 'RESET_STATE' });\n await (0, dispatchSignedInHubEvent_1.dispatchSignedInHubEvent)();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n if (nextChallengeName === 'WEB_AUTHN') {\n throw new AuthError_1.AuthError({\n name: AuthErrorStrings_1.AuthErrorCodes.SignInException,\n message: 'Sequential WEB_AUTHN challenges returned from underlying service cannot be handled.',\n });\n }\n return {\n challengeName: nextChallengeName,\n challengeParameters: nextChallengeParameters,\n };\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,0BAA0B,GAAG,0BAA0B;AAC/D,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,kBAAkB,GAAG,OAAO,CAAC,kCAAkC,CAAC;AACtE,MAAM,yBAAyB,GAAG,OAAO,CAAC,sEAAsE,CAAC;AACjH,MAAM,SAAS,GAAG,OAAO,CAAC,6BAA6B,CAAC;AACxD,MAAM,WAAW,GAAG,OAAO,CAAC,sCAAsC,CAAC;AACnE,MAAM,aAAa,GAAG,OAAO,CAAC,sDAAsD,CAAC;AACrF,MAAM,0BAA0B,GAAG,OAAO,CAAC,2DAA2D,CAAC;AACvG,MAAM,OAAO,GAAG,OAAO,CAAC,6BAA6B,CAAC;AACtD,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,SAAS,GAAG,OAAO,CAAC,qBAAqB,CAAC;AAChD,MAAM,QAAQ,GAAG,OAAO,CAAC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C;AAC7D,QAAQ,MAAM,IAAI,0BAA0B,CAAC,wBAAwB,GAAG;AACxE,QAAQ,OAAO;AACf,YAAY,UAAU,EAAE,IAAI;AAC5B,YAAY,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;AAC5C,SAAS;AACT;AACA,IAAI,IAAI,iBAAiB,KAAK,WAAW,EAAE;AAC3C,QAAQ,MAAM,IAAI,WAAW,CAAC,SAAS,CAAC;AACxC,YAAY,IAAI,EAAE,kBAAkB,CAAC,cAAc,CAAC,eAAe;AACnE,YAAY,OAAO,EAAE,qFAAqF;AAC1G,SAAS,CAAC;AACV;AACA,IAAI,OAAO;AACX,QAAQ,aAAa,EAAE,iBAAiB;AACxC,QAAQ,mBAAmB,EAAE,uBAAuB;AACpD,KAAK;AACL;;"}
1
+ {"version":3,"file":"handleWebAuthnSignInResult.js","sources":["../../../../../src/client/flows/userAuth/handleWebAuthnSignInResult.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handleWebAuthnSignInResult = handleWebAuthnSignInResult;\nconst core_1 = require(\"@aws-amplify/core\");\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst AuthErrorStrings_1 = require(\"../../../common/AuthErrorStrings\");\nconst cognitoIdentityProvider_1 = require(\"../../../foundation/factories/serviceClients/cognitoIdentityProvider\");\nconst parsers_1 = require(\"../../../foundation/parsers\");\nconst factories_1 = require(\"../../../providers/cognito/factories\");\nconst cacheTokens_1 = require(\"../../../providers/cognito/tokenProvider/cacheTokens\");\nconst dispatchSignedInHubEvent_1 = require(\"../../../providers/cognito/utils/dispatchSignedInHubEvent\");\nconst store_1 = require(\"../../../client/utils/store\");\nconst utils_2 = require(\"../../../utils\");\nconst passkey_1 = require(\"../../utils/passkey\");\nconst errors_1 = require(\"../../utils/passkey/errors\");\nconst AuthError_1 = require(\"../../../errors/AuthError\");\nconst getNewDeviceMetadata_1 = require(\"../../../providers/cognito/utils/getNewDeviceMetadata\");\nasync function handleWebAuthnSignInResult(challengeParameters) {\n const authConfig = core_1.Amplify.getConfig().Auth?.Cognito;\n (0, utils_1.assertTokenProviderConfig)(authConfig);\n const { username, signInSession, signInDetails, challengeName } = store_1.signInStore.getState();\n if (challengeName !== 'WEB_AUTHN' || !username) {\n throw new AuthError_1.AuthError({\n name: AuthErrorStrings_1.AuthErrorCodes.SignInException,\n message: 'Unable to proceed due to invalid sign in state.',\n });\n }\n const { CREDENTIAL_REQUEST_OPTIONS: credentialRequestOptions } = challengeParameters;\n (0, errors_1.assertPasskeyError)(!!credentialRequestOptions, errors_1.PasskeyErrorCode.InvalidPasskeyAuthenticationOptions);\n const cred = await (0, passkey_1.getPasskey)(JSON.parse(credentialRequestOptions));\n const respondToAuthChallenge = (0, cognitoIdentityProvider_1.createRespondToAuthChallengeClient)({\n endpointResolver: (0, factories_1.createCognitoUserPoolEndpointResolver)({\n endpointOverride: authConfig.userPoolEndpoint,\n }),\n });\n const { ChallengeName: nextChallengeName, ChallengeParameters: nextChallengeParameters, AuthenticationResult: authenticationResult, Session: nextSession, } = await respondToAuthChallenge({\n region: (0, parsers_1.getRegionFromUserPoolId)(authConfig.userPoolId),\n userAgentValue: (0, utils_2.getAuthUserAgentValue)(utils_1.AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'WEB_AUTHN',\n ChallengeResponses: {\n USERNAME: username,\n CREDENTIAL: JSON.stringify(cred),\n },\n ClientId: authConfig.userPoolClientId,\n Session: signInSession,\n });\n (0, store_1.setActiveSignInState)({\n signInSession: nextSession,\n username,\n challengeName: nextChallengeName,\n signInDetails,\n });\n if (authenticationResult) {\n await (0, cacheTokens_1.cacheCognitoTokens)({\n ...authenticationResult,\n username,\n NewDeviceMetadata: await (0, getNewDeviceMetadata_1.getNewDeviceMetadata)({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: authenticationResult.NewDeviceMetadata,\n accessToken: authenticationResult.AccessToken,\n }),\n signInDetails,\n });\n store_1.signInStore.dispatch({ type: 'RESET_STATE' });\n await (0, dispatchSignedInHubEvent_1.dispatchSignedInHubEvent)();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n if (nextChallengeName === 'WEB_AUTHN') {\n throw new AuthError_1.AuthError({\n name: AuthErrorStrings_1.AuthErrorCodes.SignInException,\n message: 'Sequential WEB_AUTHN challenges returned from underlying service cannot be handled.',\n });\n }\n return {\n challengeName: nextChallengeName,\n challengeParameters: nextChallengeParameters,\n };\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,0BAA0B,GAAG,0BAA0B;AAC/D,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,kBAAkB,GAAG,OAAO,CAAC,kCAAkC,CAAC;AACtE,MAAM,yBAAyB,GAAG,OAAO,CAAC,sEAAsE,CAAC;AACjH,MAAM,SAAS,GAAG,OAAO,CAAC,6BAA6B,CAAC;AACxD,MAAM,WAAW,GAAG,OAAO,CAAC,sCAAsC,CAAC;AACnE,MAAM,aAAa,GAAG,OAAO,CAAC,sDAAsD,CAAC;AACrF,MAAM,0BAA0B,GAAG,OAAO,CAAC,2DAA2D,CAAC;AACvG,MAAM,OAAO,GAAG,OAAO,CAAC,6BAA6B,CAAC;AACtD,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,SAAS,GAAG,OAAO,CAAC,qBAAqB,CAAC;AAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,4BAA4B,CAAC;AACtD,MAAM,WAAW,GAAG,OAAO,CAAC,2BAA2B,CAAC;A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xE,QAAQ,OAAO;AACf,YAAY,UAAU,EAAE,IAAI;AAC5B,YAAY,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;AAC5C,SAAS;AACT,IAAI;AACJ,IAAI,IAAI,iBAAiB,KAAK,WAAW,EAAE;AAC3C,QAAQ,MAAM,IAAI,WAAW,CAAC,SAAS,CAAC;AACxC,YAAY,IAAI,EAAE,kBAAkB,CAAC,cAAc,CAAC,eAAe;AACnE,YAAY,OAAO,EAAE,qFAAqF;AAC1G,SAAS,CAAC;AACV,IAAI;AACJ,IAAI,OAAO;AACX,QAAQ,aAAa,EAAE,iBAAiB;AACxC,QAAQ,mBAAmB,EAAE,uBAAuB;AACpD,KAAK;AACL;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/client/utils/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.registerPasskey = void 0;\nvar passkey_1 = require(\"./passkey\");\nObject.defineProperty(exports, \"registerPasskey\", { enumerable: true, get: function () { return passkey_1.registerPasskey; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,eAAe,GAAG,MAAM;AAChC,IAAI,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACpC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,SAAS,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/client/utils/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.registerPasskey = void 0;\nvar passkey_1 = require(\"./passkey\");\nObject.defineProperty(exports, \"registerPasskey\", { enumerable: true, get: function () { return passkey_1.registerPasskey; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,eAAe,GAAG,MAAM;AAChC,IAAI,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACpC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sources":["../../../../../src/client/utils/passkey/errors.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handlePasskeyRegistrationError = exports.handlePasskeyAuthenticationError = exports.assertPasskeyError = exports.PasskeyErrorCode = exports.PasskeyError = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nclass PasskeyError extends utils_1.AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = PasskeyError;\n Object.setPrototypeOf(this, PasskeyError.prototype);\n }\n}\nexports.PasskeyError = PasskeyError;\nvar PasskeyErrorCode;\n(function (PasskeyErrorCode) {\n // not supported\n PasskeyErrorCode[\"PasskeyNotSupported\"] = \"PasskeyNotSupported\";\n // duplicate passkey\n PasskeyErrorCode[\"PasskeyAlreadyExists\"] = \"PasskeyAlreadyExists\";\n // misconfigurations\n PasskeyErrorCode[\"InvalidPasskeyRegistrationOptions\"] = \"InvalidPasskeyRegistrationOptions\";\n PasskeyErrorCode[\"InvalidPasskeyAuthenticationOptions\"] = \"InvalidPasskeyAuthenticationOptions\";\n PasskeyErrorCode[\"RelyingPartyMismatch\"] = \"RelyingPartyMismatch\";\n // failed credential creation / retrieval\n PasskeyErrorCode[\"PasskeyRegistrationFailed\"] = \"PasskeyRegistrationFailed\";\n PasskeyErrorCode[\"PasskeyRetrievalFailed\"] = \"PasskeyRetrievalFailed\";\n // cancel / aborts\n PasskeyErrorCode[\"PasskeyRegistrationCanceled\"] = \"PasskeyRegistrationCanceled\";\n PasskeyErrorCode[\"PasskeyAuthenticationCanceled\"] = \"PasskeyAuthenticationCanceled\";\n PasskeyErrorCode[\"PasskeyOperationAborted\"] = \"PasskeyOperationAborted\";\n})(PasskeyErrorCode || (exports.PasskeyErrorCode = PasskeyErrorCode = {}));\nconst notSupportedRecoverySuggestion = 'Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.';\nconst abortOrCancelRecoverySuggestion = 'User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.';\nconst misconfigurationRecoverySuggestion = 'Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.';\nconst passkeyErrorMap = {\n [PasskeyErrorCode.PasskeyNotSupported]: {\n message: 'Passkeys may not be supported on this device.',\n recoverySuggestion: notSupportedRecoverySuggestion,\n },\n [PasskeyErrorCode.InvalidPasskeyRegistrationOptions]: {\n message: 'Invalid passkey registration options.',\n recoverySuggestion: misconfigurationRecoverySuggestion,\n },\n [PasskeyErrorCode.InvalidPasskeyAuthenticationOptions]: {\n message: 'Invalid passkey authentication options.',\n recoverySuggestion: misconfigurationRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyRegistrationFailed]: {\n message: 'Device failed to create passkey.',\n recoverySuggestion: notSupportedRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyRetrievalFailed]: {\n message: 'Device failed to retrieve passkey.',\n recoverySuggestion: 'Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP.',\n },\n [PasskeyErrorCode.PasskeyAlreadyExists]: {\n message: 'Passkey already exists in authenticator.',\n recoverySuggestion: 'Proceed with existing passkey or try again after deleting the credential.',\n },\n [PasskeyErrorCode.PasskeyRegistrationCanceled]: {\n message: 'Passkey registration ceremony has been canceled.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyAuthenticationCanceled]: {\n message: 'Passkey authentication ceremony has been canceled.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyOperationAborted]: {\n message: 'Passkey operation has been aborted.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.RelyingPartyMismatch]: {\n message: 'Relying party does not match current domain.',\n recoverySuggestion: 'Ensure relying party identifier matches current domain.',\n },\n};\nexports.assertPasskeyError = (0, utils_1.createAssertionFunction)(passkeyErrorMap, PasskeyError);\n/**\n * Handle Passkey Authentication Errors\n * https://w3c.github.io/webauthn/#sctn-get-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyAuthenticationError = (err) => {\n if (err instanceof PasskeyError) {\n return err;\n }\n if (err instanceof Error) {\n if (err.name === 'NotAllowedError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyAuthenticationCanceled];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyAuthenticationCanceled,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return handlePasskeyError(err);\n};\nexports.handlePasskeyAuthenticationError = handlePasskeyAuthenticationError;\n/**\n * Handle Passkey Registration Errors\n * https://w3c.github.io/webauthn/#sctn-create-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyRegistrationError = (err) => {\n if (err instanceof PasskeyError) {\n return err;\n }\n if (err instanceof Error) {\n // Duplicate Passkey\n if (err.name === 'InvalidStateError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyAlreadyExists];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyAlreadyExists,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n // User Cancels Ceremony / Generic Catch All\n if (err.name === 'NotAllowedError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyRegistrationCanceled];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyRegistrationCanceled,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return handlePasskeyError(err);\n};\nexports.handlePasskeyRegistrationError = handlePasskeyRegistrationError;\n/**\n * Handles Overlapping Passkey Errors Between Registration & Authentication\n * https://w3c.github.io/webauthn/#sctn-create-request-exceptions\n * https://w3c.github.io/webauthn/#sctn-get-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyError = (err) => {\n if (err instanceof Error) {\n // Passkey Operation Aborted\n if (err.name === 'AbortError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyOperationAborted];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyOperationAborted,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n // Relying Party / Domain Mismatch\n if (err.name === 'SecurityError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.RelyingPartyMismatch];\n return new PasskeyError({\n name: PasskeyErrorCode.RelyingPartyMismatch,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return new PasskeyError({\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: err,\n });\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,8BAA8B,GAAG,OAAO,CAAC,gCAAgC,GAAG,OAAO,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AAC1G,YAAY,OAAO,IAAI,YAAY,CAAC;AACpC,gBAAgB,IAAI,EAAE,gBAAgB,CAAC,oBAAoB;AAC3D,gBAAgB,OAAO;AACvB,gBAAgB,kBAAkB;AAClC,gBAAgB,eAAe,EAAE,GAAG;AACpC,aAAa,CAAC;AACd;AACA;AACA,IAAI,OAAO,IAAI,YAAY,CAAC;AAC5B,QAAQ,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO;AAC9C,QAAQ,OAAO,EAAE,gCAAgC;AACjD,QAAQ,eAAe,EAAE,GAAG;AAC5B,KAAK,CAAC;AACN,CAAC;;"}
1
+ {"version":3,"file":"errors.js","sources":["../../../../../src/client/utils/passkey/errors.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handlePasskeyRegistrationError = exports.handlePasskeyAuthenticationError = exports.assertPasskeyError = exports.PasskeyErrorCode = exports.PasskeyError = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nclass PasskeyError extends utils_1.AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = PasskeyError;\n Object.setPrototypeOf(this, PasskeyError.prototype);\n }\n}\nexports.PasskeyError = PasskeyError;\nvar PasskeyErrorCode;\n(function (PasskeyErrorCode) {\n // not supported\n PasskeyErrorCode[\"PasskeyNotSupported\"] = \"PasskeyNotSupported\";\n // duplicate passkey\n PasskeyErrorCode[\"PasskeyAlreadyExists\"] = \"PasskeyAlreadyExists\";\n // misconfigurations\n PasskeyErrorCode[\"InvalidPasskeyRegistrationOptions\"] = \"InvalidPasskeyRegistrationOptions\";\n PasskeyErrorCode[\"InvalidPasskeyAuthenticationOptions\"] = \"InvalidPasskeyAuthenticationOptions\";\n PasskeyErrorCode[\"RelyingPartyMismatch\"] = \"RelyingPartyMismatch\";\n // failed credential creation / retrieval\n PasskeyErrorCode[\"PasskeyRegistrationFailed\"] = \"PasskeyRegistrationFailed\";\n PasskeyErrorCode[\"PasskeyRetrievalFailed\"] = \"PasskeyRetrievalFailed\";\n // cancel / aborts\n PasskeyErrorCode[\"PasskeyRegistrationCanceled\"] = \"PasskeyRegistrationCanceled\";\n PasskeyErrorCode[\"PasskeyAuthenticationCanceled\"] = \"PasskeyAuthenticationCanceled\";\n PasskeyErrorCode[\"PasskeyOperationAborted\"] = \"PasskeyOperationAborted\";\n})(PasskeyErrorCode || (exports.PasskeyErrorCode = PasskeyErrorCode = {}));\nconst notSupportedRecoverySuggestion = 'Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.';\nconst abortOrCancelRecoverySuggestion = 'User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.';\nconst misconfigurationRecoverySuggestion = 'Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.';\nconst passkeyErrorMap = {\n [PasskeyErrorCode.PasskeyNotSupported]: {\n message: 'Passkeys may not be supported on this device.',\n recoverySuggestion: notSupportedRecoverySuggestion,\n },\n [PasskeyErrorCode.InvalidPasskeyRegistrationOptions]: {\n message: 'Invalid passkey registration options.',\n recoverySuggestion: misconfigurationRecoverySuggestion,\n },\n [PasskeyErrorCode.InvalidPasskeyAuthenticationOptions]: {\n message: 'Invalid passkey authentication options.',\n recoverySuggestion: misconfigurationRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyRegistrationFailed]: {\n message: 'Device failed to create passkey.',\n recoverySuggestion: notSupportedRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyRetrievalFailed]: {\n message: 'Device failed to retrieve passkey.',\n recoverySuggestion: 'Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP.',\n },\n [PasskeyErrorCode.PasskeyAlreadyExists]: {\n message: 'Passkey already exists in authenticator.',\n recoverySuggestion: 'Proceed with existing passkey or try again after deleting the credential.',\n },\n [PasskeyErrorCode.PasskeyRegistrationCanceled]: {\n message: 'Passkey registration ceremony has been canceled.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyAuthenticationCanceled]: {\n message: 'Passkey authentication ceremony has been canceled.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyOperationAborted]: {\n message: 'Passkey operation has been aborted.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.RelyingPartyMismatch]: {\n message: 'Relying party does not match current domain.',\n recoverySuggestion: 'Ensure relying party identifier matches current domain.',\n },\n};\nexports.assertPasskeyError = (0, utils_1.createAssertionFunction)(passkeyErrorMap, PasskeyError);\n/**\n * Handle Passkey Authentication Errors\n * https://w3c.github.io/webauthn/#sctn-get-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyAuthenticationError = (err) => {\n if (err instanceof PasskeyError) {\n return err;\n }\n if (err instanceof Error) {\n if (err.name === 'NotAllowedError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyAuthenticationCanceled];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyAuthenticationCanceled,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return handlePasskeyError(err);\n};\nexports.handlePasskeyAuthenticationError = handlePasskeyAuthenticationError;\n/**\n * Handle Passkey Registration Errors\n * https://w3c.github.io/webauthn/#sctn-create-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyRegistrationError = (err) => {\n if (err instanceof PasskeyError) {\n return err;\n }\n if (err instanceof Error) {\n // Duplicate Passkey\n if (err.name === 'InvalidStateError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyAlreadyExists];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyAlreadyExists,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n // User Cancels Ceremony / Generic Catch All\n if (err.name === 'NotAllowedError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyRegistrationCanceled];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyRegistrationCanceled,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return handlePasskeyError(err);\n};\nexports.handlePasskeyRegistrationError = handlePasskeyRegistrationError;\n/**\n * Handles Overlapping Passkey Errors Between Registration & Authentication\n * https://w3c.github.io/webauthn/#sctn-create-request-exceptions\n * https://w3c.github.io/webauthn/#sctn-get-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyError = (err) => {\n if (err instanceof Error) {\n // Passkey Operation Aborted\n if (err.name === 'AbortError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyOperationAborted];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyOperationAborted,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n // Relying Party / Domain Mismatch\n if (err.name === 'SecurityError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.RelyingPartyMismatch];\n return new PasskeyError({\n name: PasskeyErrorCode.RelyingPartyMismatch,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return new PasskeyError({\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: err,\n });\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,8BAA8B,GAAG,OAAO,CAAC,gCAAgC,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM;AACzK,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,YAAY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AAoB;AAC3D,gBAAgB,OAAO;AACvB,gBAAgB,kBAAkB;AAClC,gBAAgB,eAAe,EAAE,GAAG;AACpC,aAAa,CAAC;AACd,QAAQ;AACR,IAAI;AACJ,IAAI,OAAO,IAAI,YAAY,CAAC;AAC5B,QAAQ,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO;AAC9C,QAAQ,OAAO,EAAE,gCAAgC;AACjD,QAAQ,eAAe,EAAE,GAAG;AAC5B,KAAK,CAAC;AACN,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPasskey.js","sources":["../../../../../src/client/utils/passkey/getPasskey.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getPasskey = void 0;\nconst errors_1 = require(\"./errors\");\nconst getIsPasskeySupported_1 = require(\"./getIsPasskeySupported\");\nconst serde_1 = require(\"./serde\");\nconst types_1 = require(\"./types\");\nconst getPasskey = async (input) => {\n try {\n const isPasskeySupported = (0, getIsPasskeySupported_1.getIsPasskeySupported)();\n (0, errors_1.assertPasskeyError)(isPasskeySupported, errors_1.PasskeyErrorCode.PasskeyNotSupported);\n const passkeyGetOptions = (0, serde_1.deserializeJsonToPkcGetOptions)(input);\n const credential = await navigator.credentials.get({\n publicKey: passkeyGetOptions,\n });\n (0, types_1.assertCredentialIsPkcWithAuthenticatorAssertionResponse)(credential);\n return (0, serde_1.serializePkcWithAssertionToJson)(credential);\n }\n catch (err) {\n throw (0, errors_1.handlePasskeyAuthenticationError)(err);\n }\n};\nexports.getPasskey = getPasskey;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,UAAU,GAAG,MAAM;AAC3B,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;AACpC,MAAM,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;AAClE,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAClC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAClC,MAAM,UAAU,GAAG,OAAO,KAAK,KAAK;AACpC,IAAI,IAAI;AACR,QAAQ,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC,qBAAqB,GAAG;AACvF,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,mBAAmB,CAAC;AAC3G,QAAQ,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,8BAA8B,EAAE,KAAK,CAAC;AACpF,QAAQ,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC;AAC3D,YAAY,SAAS,EAAE,iBAAiB;AACxC,SAAS,CAAC;AACV,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,uDAAuD,EAAE,UAAU,CAAC;AACxF,QAAQ,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,+BAA+B,EAAE,UAAU,CAAC;AACvE;AACA,IAAI,OAAO,GAAG,EAAE;AAChB,QAAQ,MAAM,IAAI,QAAQ,CAAC,gCAAgC,EAAE,GAAG,CAAC;AACjE;AACA,CAAC;AACD,OAAO,CAAC,UAAU,GAAG,UAAU;;"}
1
+ {"version":3,"file":"getPasskey.js","sources":["../../../../../src/client/utils/passkey/getPasskey.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getPasskey = void 0;\nconst errors_1 = require(\"./errors\");\nconst getIsPasskeySupported_1 = require(\"./getIsPasskeySupported\");\nconst serde_1 = require(\"./serde\");\nconst types_1 = require(\"./types\");\nconst getPasskey = async (input) => {\n try {\n const isPasskeySupported = (0, getIsPasskeySupported_1.getIsPasskeySupported)();\n (0, errors_1.assertPasskeyError)(isPasskeySupported, errors_1.PasskeyErrorCode.PasskeyNotSupported);\n const passkeyGetOptions = (0, serde_1.deserializeJsonToPkcGetOptions)(input);\n const credential = await navigator.credentials.get({\n publicKey: passkeyGetOptions,\n });\n (0, types_1.assertCredentialIsPkcWithAuthenticatorAssertionResponse)(credential);\n return (0, serde_1.serializePkcWithAssertionToJson)(credential);\n }\n catch (err) {\n throw (0, errors_1.handlePasskeyAuthenticationError)(err);\n }\n};\nexports.getPasskey = getPasskey;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,UAAU,GAAG,MAAM;AAC3B,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;AACpC,MAAM,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;AAClE,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAClC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAClC,MAAM,UAAU,GAAG,OAAO,KAAK,KAAK;AACpC,IAAI,IAAI;AACR,QAAQ,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC,qBAAqB,GAAG;AACvF,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,mBAAmB,CAAC;AAC3G,QAAQ,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,8BAA8B,EAAE,KAAK,CAAC;AACpF,QAAQ,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC;AAC3D,YAAY,SAAS,EAAE,iBAAiB;AACxC,SAAS,CAAC;AACV,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,uDAAuD,EAAE,UAAU,CAAC;AACxF,QAAQ,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,+BAA+B,EAAE,UAAU,CAAC;AACvE,IAAI;AACJ,IAAI,OAAO,GAAG,EAAE;AAChB,QAAQ,MAAM,IAAI,QAAQ,CAAC,gCAAgC,EAAE,GAAG,CAAC;AACjE,IAAI;AACJ,CAAC;AACD,OAAO,CAAC,UAAU,GAAG,UAAU;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/client/utils/passkey/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getPasskey = exports.registerPasskey = void 0;\nvar registerPasskey_1 = require(\"./registerPasskey\");\nObject.defineProperty(exports, \"registerPasskey\", { enumerable: true, get: function () { return registerPasskey_1.registerPasskey; } });\nvar getPasskey_1 = require(\"./getPasskey\");\nObject.defineProperty(exports, \"getPasskey\", { enumerable: true, get: function () { return getPasskey_1.getPasskey; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,eAAe,GAAG,MAAM;AACrD,IAAI,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC;AACpD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,iBAAiB,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC;AACvI,IAAI,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;AAC1C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/client/utils/passkey/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getPasskey = exports.registerPasskey = void 0;\nvar registerPasskey_1 = require(\"./registerPasskey\");\nObject.defineProperty(exports, \"registerPasskey\", { enumerable: true, get: function () { return registerPasskey_1.registerPasskey; } });\nvar getPasskey_1 = require(\"./getPasskey\");\nObject.defineProperty(exports, \"getPasskey\", { enumerable: true, get: function () { return getPasskey_1.getPasskey; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,eAAe,GAAG,MAAM;AACrD,IAAI,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC;AACpD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;AACvI,IAAI,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;AAC1C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"registerPasskey.js","sources":["../../../../../src/client/utils/passkey/registerPasskey.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.registerPasskey = void 0;\nconst types_1 = require(\"./types\");\nconst serde_1 = require(\"./serde\");\nconst errors_1 = require(\"./errors\");\nconst getIsPasskeySupported_1 = require(\"./getIsPasskeySupported\");\n/**\n * Registers a new passkey for user\n * @param input - PasskeyCreateOptionsJson\n * @returns serialized PasskeyCreateResult\n */\nconst registerPasskey = async (input) => {\n try {\n const isPasskeySupported = (0, getIsPasskeySupported_1.getIsPasskeySupported)();\n (0, errors_1.assertPasskeyError)(isPasskeySupported, errors_1.PasskeyErrorCode.PasskeyNotSupported);\n const passkeyCreationOptions = (0, serde_1.deserializeJsonToPkcCreationOptions)(input);\n const credential = await navigator.credentials.create({\n publicKey: passkeyCreationOptions,\n });\n (0, types_1.assertCredentialIsPkcWithAuthenticatorAttestationResponse)(credential);\n return (0, serde_1.serializePkcWithAttestationToJson)(credential);\n }\n catch (err) {\n throw (0, errors_1.handlePasskeyRegistrationError)(err);\n }\n};\nexports.registerPasskey = registerPasskey;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,eAAe,GAAG,MAAM;AAChC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAClC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAClC,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;AACpC,MAAM,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;AAClE;AACA;AACA;AACA;AACA;AACA,MAAM,eAAe,GAAG,OAAO,KAAK,KAAK;AACzC,IAAI,IAAI;AACR,QAAQ,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC,qBAAqB,GAAG;AACvF,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,mBAAmB,CAAC;AAC3G,QAAQ,MAAM,sBAAsB,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,mCAAmC,EAAE,KAAK,CAAC;AAC9F,QAAQ,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC;AAC9D,YAAY,SAAS,EAAE,sBAAsB;AAC7C,SAAS,CAAC;AACV,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,yDAAyD,EAAE,UAAU,CAAC;AAC1F,QAAQ,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,iCAAiC,EAAE,UAAU,CAAC;AACzE;AACA,IAAI,OAAO,GAAG,EAAE;AAChB,QAAQ,MAAM,IAAI,QAAQ,CAAC,8BAA8B,EAAE,GAAG,CAAC;AAC/D;AACA,CAAC;AACD,OAAO,CAAC,eAAe,GAAG,eAAe;;"}
1
+ {"version":3,"file":"registerPasskey.js","sources":["../../../../../src/client/utils/passkey/registerPasskey.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.registerPasskey = void 0;\nconst types_1 = require(\"./types\");\nconst serde_1 = require(\"./serde\");\nconst errors_1 = require(\"./errors\");\nconst getIsPasskeySupported_1 = require(\"./getIsPasskeySupported\");\n/**\n * Registers a new passkey for user\n * @param input - PasskeyCreateOptionsJson\n * @returns serialized PasskeyCreateResult\n */\nconst registerPasskey = async (input) => {\n try {\n const isPasskeySupported = (0, getIsPasskeySupported_1.getIsPasskeySupported)();\n (0, errors_1.assertPasskeyError)(isPasskeySupported, errors_1.PasskeyErrorCode.PasskeyNotSupported);\n const passkeyCreationOptions = (0, serde_1.deserializeJsonToPkcCreationOptions)(input);\n const credential = await navigator.credentials.create({\n publicKey: passkeyCreationOptions,\n });\n (0, types_1.assertCredentialIsPkcWithAuthenticatorAttestationResponse)(credential);\n return (0, serde_1.serializePkcWithAttestationToJson)(credential);\n }\n catch (err) {\n throw (0, errors_1.handlePasskeyRegistrationError)(err);\n }\n};\nexports.registerPasskey = registerPasskey;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,eAAe,GAAG,MAAM;AAChC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAClC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAClC,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;AACpC,MAAM,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;AAClE;AACA;AACA;AACA;AACA;AACA,MAAM,eAAe,GAAG,OAAO,KAAK,KAAK;AACzC,IAAI,IAAI;AACR,QAAQ,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC,qBAAqB,GAAG;AACvF,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,mBAAmB,CAAC;AAC3G,QAAQ,MAAM,sBAAsB,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,mCAAmC,EAAE,KAAK,CAAC;AAC9F,QAAQ,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC;AAC9D,YAAY,SAAS,EAAE,sBAAsB;AAC7C,SAAS,CAAC;AACV,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,yDAAyD,EAAE,UAAU,CAAC;AAC1F,QAAQ,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,iCAAiC,EAAE,UAAU,CAAC;AACzE,IAAI;AACJ,IAAI,OAAO,GAAG,EAAE;AAChB,QAAQ,MAAM,IAAI,QAAQ,CAAC,8BAA8B,EAAE,GAAG,CAAC;AAC/D,IAAI;AACJ,CAAC;AACD,OAAO,CAAC,eAAe,GAAG,eAAe;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"serde.js","sources":["../../../../../src/client/utils/passkey/serde.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializePkcWithAssertionToJson = exports.deserializeJsonToPkcGetOptions = exports.serializePkcWithAttestationToJson = exports.deserializeJsonToPkcCreationOptions = void 0;\nconst convert_1 = require(\"../../../foundation/convert\");\n/**\n * Deserializes Public Key Credential Creation Options JSON\n * @param input PasskeyCreateOptionsJson\n * @returns PublicKeyCredentialCreationOptions\n */\nconst deserializeJsonToPkcCreationOptions = (input) => {\n const userIdBuffer = (0, convert_1.convertBase64UrlToArrayBuffer)(input.user.id);\n const challengeBuffer = (0, convert_1.convertBase64UrlToArrayBuffer)(input.challenge);\n const excludeCredentialsWithBuffer = (input.excludeCredentials || []).map(excludeCred => ({\n ...excludeCred,\n id: (0, convert_1.convertBase64UrlToArrayBuffer)(excludeCred.id),\n }));\n return {\n ...input,\n excludeCredentials: excludeCredentialsWithBuffer,\n challenge: challengeBuffer,\n user: {\n ...input.user,\n id: userIdBuffer,\n },\n };\n};\nexports.deserializeJsonToPkcCreationOptions = deserializeJsonToPkcCreationOptions;\n/**\n * Serializes a Public Key Credential With Attestation to JSON\n * @param input PasskeyCreateResult\n * @returns PasskeyCreateResultJson\n */\nconst serializePkcWithAttestationToJson = (input) => {\n const response = {\n clientDataJSON: (0, convert_1.convertArrayBufferToBase64Url)(input.response.clientDataJSON),\n attestationObject: (0, convert_1.convertArrayBufferToBase64Url)(input.response.attestationObject),\n transports: input.response.getTransports(),\n publicKeyAlgorithm: input.response.getPublicKeyAlgorithm(),\n authenticatorData: (0, convert_1.convertArrayBufferToBase64Url)(input.response.getAuthenticatorData()),\n };\n const publicKey = input.response.getPublicKey();\n if (publicKey) {\n response.publicKey = (0, convert_1.convertArrayBufferToBase64Url)(publicKey);\n }\n const resultJson = {\n type: input.type,\n id: input.id,\n rawId: (0, convert_1.convertArrayBufferToBase64Url)(input.rawId),\n clientExtensionResults: input.getClientExtensionResults(),\n response,\n };\n if (input.authenticatorAttachment) {\n resultJson.authenticatorAttachment = input.authenticatorAttachment;\n }\n return resultJson;\n};\nexports.serializePkcWithAttestationToJson = serializePkcWithAttestationToJson;\n/**\n * Deserializes Public Key Credential Get Options JSON\n * @param input PasskeyGetOptionsJson\n * @returns PublicKeyCredentialRequestOptions\n */\nconst deserializeJsonToPkcGetOptions = (input) => {\n const challengeBuffer = (0, convert_1.convertBase64UrlToArrayBuffer)(input.challenge);\n const allowedCredentialsWithBuffer = (input.allowCredentials || []).map(allowedCred => ({\n ...allowedCred,\n id: (0, convert_1.convertBase64UrlToArrayBuffer)(allowedCred.id),\n }));\n return {\n ...input,\n challenge: challengeBuffer,\n allowCredentials: allowedCredentialsWithBuffer,\n };\n};\nexports.deserializeJsonToPkcGetOptions = deserializeJsonToPkcGetOptions;\n/**\n * Serializes a Public Key Credential With Attestation to JSON\n * @param input PasskeyGetResult\n * @returns PasskeyGetResultJson\n */\nconst serializePkcWithAssertionToJson = (input) => {\n const response = {\n clientDataJSON: (0, convert_1.convertArrayBufferToBase64Url)(input.response.clientDataJSON),\n authenticatorData: (0, convert_1.convertArrayBufferToBase64Url)(input.response.authenticatorData),\n signature: (0, convert_1.convertArrayBufferToBase64Url)(input.response.signature),\n };\n if (input.response.userHandle) {\n response.userHandle = (0, convert_1.convertArrayBufferToBase64Url)(input.response.userHandle);\n }\n const resultJson = {\n id: input.id,\n rawId: (0, convert_1.convertArrayBufferToBase64Url)(input.rawId),\n type: input.type,\n clientExtensionResults: input.getClientExtensionResults(),\n response,\n };\n if (input.authenticatorAttachment) {\n resultJson.authenticatorAttachment = input.authenticatorAttachment;\n }\n return resultJson;\n};\nexports.serializePkcWithA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I,IAAI,KAAK,CAAC,uBAAuB,EAAE;AACvC,QAAQ,UAAU,CAAC,uBAAuB,GAAG,KAAK,CAAC,uBAAuB;AAC1E;AACA,IAAI,OAAO,UAAU;AACrB,CAAC;AACD,OAAO,CAAC,+BAA+B,GAAG,+BAA+B;;"}
1
+ {"version":3,"file":"serde.js","sources":["../../../../../src/client/utils/passkey/serde.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializePkcWithAssertionToJson = exports.deserializeJsonToPkcGetOptions = exports.serializePkcWithAttestationToJson = exports.deserializeJsonToPkcCreationOptions = void 0;\nconst convert_1 = require(\"../../../foundation/convert\");\n/**\n * Deserializes Public Key Credential Creation Options JSON\n * @param input PasskeyCreateOptionsJson\n * @returns PublicKeyCredentialCreationOptions\n */\nconst deserializeJsonToPkcCreationOptions = (input) => {\n const userIdBuffer = (0, convert_1.convertBase64UrlToArrayBuffer)(input.user.id);\n const challengeBuffer = (0, convert_1.convertBase64UrlToArrayBuffer)(input.challenge);\n const excludeCredentialsWithBuffer = (input.excludeCredentials || []).map(excludeCred => ({\n ...excludeCred,\n id: (0, convert_1.convertBase64UrlToArrayBuffer)(excludeCred.id),\n }));\n return {\n ...input,\n excludeCredentials: excludeCredentialsWithBuffer,\n challenge: challengeBuffer,\n user: {\n ...input.user,\n id: userIdBuffer,\n },\n };\n};\nexports.deserializeJsonToPkcCreationOptions = deserializeJsonToPkcCreationOptions;\n/**\n * Serializes a Public Key Credential With Attestation to JSON\n * @param input PasskeyCreateResult\n * @returns PasskeyCreateResultJson\n */\nconst serializePkcWithAttestationToJson = (input) => {\n const response = {\n clientDataJSON: (0, convert_1.convertArrayBufferToBase64Url)(input.response.clientDataJSON),\n attestationObject: (0, convert_1.convertArrayBufferToBase64Url)(input.response.attestationObject),\n transports: input.response.getTransports(),\n publicKeyAlgorithm: input.response.getPublicKeyAlgorithm(),\n authenticatorData: (0, convert_1.convertArrayBufferToBase64Url)(input.response.getAuthenticatorData()),\n };\n const publicKey = input.response.getPublicKey();\n if (publicKey) {\n response.publicKey = (0, convert_1.convertArrayBufferToBase64Url)(publicKey);\n }\n const resultJson = {\n type: input.type,\n id: input.id,\n rawId: (0, convert_1.convertArrayBufferToBase64Url)(input.rawId),\n clientExtensionResults: input.getClientExtensionResults(),\n response,\n };\n if (input.authenticatorAttachment) {\n resultJson.authenticatorAttachment = input.authenticatorAttachment;\n }\n return resultJson;\n};\nexports.serializePkcWithAttestationToJson = serializePkcWithAttestationToJson;\n/**\n * Deserializes Public Key Credential Get Options JSON\n * @param input PasskeyGetOptionsJson\n * @returns PublicKeyCredentialRequestOptions\n */\nconst deserializeJsonToPkcGetOptions = (input) => {\n const challengeBuffer = (0, convert_1.convertBase64UrlToArrayBuffer)(input.challenge);\n const allowedCredentialsWithBuffer = (input.allowCredentials || []).map(allowedCred => ({\n ...allowedCred,\n id: (0, convert_1.convertBase64UrlToArrayBuffer)(allowedCred.id),\n }));\n return {\n ...input,\n challenge: challengeBuffer,\n allowCredentials: allowedCredentialsWithBuffer,\n };\n};\nexports.deserializeJsonToPkcGetOptions = deserializeJsonToPkcGetOptions;\n/**\n * Serializes a Public Key Credential With Attestation to JSON\n * @param input PasskeyGetResult\n * @returns PasskeyGetResultJson\n */\nconst serializePkcWithAssertionToJson = (input) => {\n const response = {\n clientDataJSON: (0, convert_1.convertArrayBufferToBase64Url)(input.response.clientDataJSON),\n authenticatorData: (0, convert_1.convertArrayBufferToBase64Url)(input.response.authenticatorData),\n signature: (0, convert_1.convertArrayBufferToBase64Url)(input.response.signature),\n };\n if (input.response.userHandle) {\n response.userHandle = (0, convert_1.convertArrayBufferToBase64Url)(input.response.userHandle);\n }\n const resultJson = {\n id: input.id,\n rawId: (0, convert_1.convertArrayBufferToBase64Url)(input.rawId),\n type: input.type,\n clientExtensionResults: input.getClientExtensionResults(),\n response,\n };\n if (input.authenticatorAttachment) {\n resultJson.authenticatorAttachment = input.authenticatorAttachment;\n }\n return resultJson;\n};\nexports.serializePkcWithAssertionToJson = serializePkcWithAssertionToJson;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,+BAA+B,GAAG,OAAO,CAAC,8BAA8B,GAAG,OAAO,CAAC,iCAAiC,GAAG,OAAO,CAAC,mCAAmC,GAAG,MAAM;AACnL,MAAM,SAAS,GAAG,OAAO,CAAC,6BAA6B,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA,MAAM,mCAAmC,GAAG,CAAC,KAAK,KAAK;AACvD,IAAI,MAAM,YAAY,GAAG,IAAI,SAAS,CAAC,6BAA6B,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;AACpF,IAAI,MAAM,eAAe,GAAG,IAAI,SAAS,CAAC,6BAA6B,EAAE,KAAK,CAAC,SAAS,CAAC;AACzF,IAAI,MAAM,4BAA4B,GAAG,CAAC,KAAK,CAAC,kBAAkB,IAAI,EAAE,EAAE,GAAG,CAAC,WAAW,KAAK;AAC9F,QAAQ,GAAG,WAAW;AACtB,QAAQ,EAAE,EAAE,IAAI,SAAS,CAAC,6BAA6B,EAAE,WAAW,CAAC,EAAE,CAAC;AACxE,KAAK,CAAC,CAAC;AACP,IAAI,OAAO;AACX,QAAQ,GAAG,KAAK;AAChB,QAAQ,kBAAkB,EAAE,4BAA4B;AACxD,QAAQ,SAAS,EAAE,eAAe;AAClC,QAAQ,IAAI,EAAE;AACd,YAAY,GAAG,KAAK,CAAC,IAAI;AACzB,YAAY,EAAE,EAAE,YAAY;AAC5B,SAAS;AACT,KAAK;AACL,CAAC;AACD,OAAO,CAAC,mCAAmC,GAAG,mCAAmC;AACjF;AACA;AACA;AACA;AACA;AACA,MAAM,iCAAiC,GAAG,CAAC,KAAK,KAAK;AACrD,IA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,IAAI;AACxB,QAAQ,sBAAsB,EAAE,KAAK,CAAC,yBAAyB,EAAE;AACjE,QAAQ,QAAQ;AAChB,KAAK;AACL,IAAI,IAAI,KAAK,CAAC,uBAAuB,EAAE;AACvC,QAAQ,UAAU,CAAC,uBAAuB,GAAG,KAAK,CAAC,uBAAuB;AAC1E,IAAI;AACJ,IAAI,OAAO,UAAU;AACrB,CAAC;AACD,OAAO,CAAC,+BAA+B,GAAG,+BAA+B;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/client/utils/passkey/types/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertValidCredentialCreationOptions = void 0;\nexports.assertCredentialIsPkcWithAuthenticatorAttestationResponse = assertCredentialIsPkcWithAuthenticatorAttestationResponse;\nexports.assertCredentialIsPkcWithAuthenticatorAssertionResponse = assertCredentialIsPkcWithAuthenticatorAssertionResponse;\nconst errors_1 = require(\"../errors\");\n/**\n * Passkey Create Types\n */\nvar shared_1 = require(\"./shared\");\nObject.defineProperty(exports, \"assertValidCredentialCreationOptions\", { enumerable: true, get: function () { return shared_1.assertValidCredentialCreationOptions; } });\nfunction assertCredentialIsPkcWithAuthenticatorAttestationResponse(credential) {\n (0, errors_1.assertPasskeyError)(credential &&\n credential instanceof PublicKeyCredential &&\n credential.response instanceof AuthenticatorAttestationResponse, errors_1.PasskeyErrorCode.PasskeyRegistrationFailed);\n}\nfunction assertCredentialIsPkcWithAuthenticatorAssertionResponse(credential) {\n (0, errors_1.assertPasskeyError)(credential &&\n credential instanceof PublicKeyCredential &&\n credential.response instanceof AuthenticatorAssertionResponse, errors_1.PasskeyErrorCode.PasskeyRetrievalFailed);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oCAAoC,GAAG,MAAM;AACrD,OAAO,CAAC,yDAAyD,GAAG,yDAAyD;AAC7H,OAAO,CAAC,uDAAuD,GAAG,uDAAuD;AACzH,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC;AACrC;AACA;AACA;AACA,IAAI,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;AAClC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,sCAAsC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,oCAAoC,CAAC,EAAE,EAAE,CAAC;AACxK,SAAS,yDAAyD,CAAC,UAAU,EAAE;AAC/E,IAAI,IAAI,QAAQ,CAAC,kBAAkB,EAAE,UAAU;AAC/C,QAAQ,UAAU,YAAY,mBAAmB;AACjD,QAAQ,UAAU,CAAC,QAAQ,YAAY,gCAAgC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,yBAAyB,CAAC;AAC7H;AACA,SAAS,uDAAuD,CAAC,UAAU,EAAE;AAC7E,IAAI,IAAI,QAAQ,CAAC,kBAAkB,EAAE,UAAU;AAC/C,QAAQ,UAAU,YAAY,mBAAmB;AACjD,QAAQ,UAAU,CAAC,QAAQ,YAAY,8BAA8B,EAAE,QAAQ,CAAC,gBAAgB,CAAC,sBAAsB,CAAC;AACxH;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/client/utils/passkey/types/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertValidCredentialCreationOptions = void 0;\nexports.assertCredentialIsPkcWithAuthenticatorAttestationResponse = assertCredentialIsPkcWithAuthenticatorAttestationResponse;\nexports.assertCredentialIsPkcWithAuthenticatorAssertionResponse = assertCredentialIsPkcWithAuthenticatorAssertionResponse;\nconst errors_1 = require(\"../errors\");\n/**\n * Passkey Create Types\n */\nvar shared_1 = require(\"./shared\");\nObject.defineProperty(exports, \"assertValidCredentialCreationOptions\", { enumerable: true, get: function () { return shared_1.assertValidCredentialCreationOptions; } });\nfunction assertCredentialIsPkcWithAuthenticatorAttestationResponse(credential) {\n (0, errors_1.assertPasskeyError)(credential &&\n credential instanceof PublicKeyCredential &&\n credential.response instanceof AuthenticatorAttestationResponse, errors_1.PasskeyErrorCode.PasskeyRegistrationFailed);\n}\nfunction assertCredentialIsPkcWithAuthenticatorAssertionResponse(credential) {\n (0, errors_1.assertPasskeyError)(credential &&\n credential instanceof PublicKeyCredential &&\n credential.response instanceof AuthenticatorAssertionResponse, errors_1.PasskeyErrorCode.PasskeyRetrievalFailed);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oCAAoC,GAAG,MAAM;AACrD,OAAO,CAAC,yDAAyD,GAAG,yDAAyD;AAC7H,OAAO,CAAC,uDAAuD,GAAG,uDAAuD;AACzH,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC;AACrC;AACA;AACA;AACA,IAAI,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;AAClC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,sCAAsC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,oCAAoC,CAAC,CAAC,CAAC,EAAE,CAAC;AACxK,SAAS,yDAAyD,CAAC,UAAU,EAAE;AAC/E,IAAI,IAAI,QAAQ,CAAC,kBAAkB,EAAE,UAAU;AAC/C,QAAQ,UAAU,YAAY,mBAAmB;AACjD,QAAQ,UAAU,CAAC,QAAQ,YAAY,gCAAgC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,yBAAyB,CAAC;AAC7H;AACA,SAAS,uDAAuD,CAAC,UAAU,EAAE;AAC7E,IAAI,IAAI,QAAQ,CAAC,kBAAkB,EAAE,UAAU;AAC/C,QAAQ,UAAU,YAAY,mBAAmB;AACjD,QAAQ,UAAU,CAAC,QAAQ,YAAY,8BAA8B,EAAE,QAAQ,CAAC,gBAAgB,CAAC,sBAAsB,CAAC;AACxH;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"autoSignInStore.js","sources":["../../../../../src/client/utils/store/autoSignInStore.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.autoSignInStore = void 0;\nfunction defaultState() {\n return {\n active: false,\n };\n}\nconst autoSignInReducer = (state, action) => {\n switch (action.type) {\n case 'SET_USERNAME':\n return {\n ...state,\n username: action.value,\n };\n case 'SET_SESSION':\n return {\n ...state,\n session: action.value,\n };\n case 'START':\n return {\n ...state,\n active: true,\n };\n case 'RESET':\n return defaultState();\n default:\n return state;\n }\n};\nconst createAutoSignInStore = (reducer) => {\n let currentState = reducer(defaultState(), { type: 'RESET' });\n return {\n getState: () => currentState,\n dispatch: action => {\n currentState = reducer(currentState, action);\n },\n };\n};\nexports.autoSignInStore = createAutoSignInStore(autoSignInReducer);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,eAAe,GAAG,MAAM;AAChC,SAAS,YAAY,GAAG;AACxB,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,KAAK;AACrB,KAAK;AACL;AACA,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK;AAC7C,IAAI,QAAQ,MAAM,CAAC,IAAI;AACvB,QAAQ,KAAK,cAAc;AAC3B,YAAY,OAAO;AACnB,gBAAgB,GAAG,KAAK;AACxB,gBAAgB,QAAQ,EAAE,MAAM,CAAC,KAAK;AACtC,aAAa;AACb,QAAQ,KAAK,aAAa;AAC1B,YAAY,OAAO;AACnB,gBAAgB,GAAG,KAAK;AACxB,gBAAgB,OAAO,EAAE,MAAM,CAAC,KAAK;AACrC,aAAa;AACb,QAAQ,KAAK,OAAO;AACpB,YAAY,OAAO;AACnB,gBAAgB,GAAG,KAAK;AACxB,gBAAgB,MAAM,EAAE,IAAI;AAC5B,aAAa;AACb,QAAQ,KAAK,OAAO;AACpB,YAAY,OAAO,YAAY,EAAE;AACjC,QAAQ;AACR,YAAY,OAAO,KAAK;AACxB;AACA,CAAC;AACD,MAAM,qBAAqB,GAAG,CAAC,OAAO,KAAK;AAC3C,IAAI,IAAI,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACjE,IAAI,OAAO;AACX,QAAQ,QAAQ,EAAE,MAAM,YAAY;AACpC,QAAQ,QAAQ,EAAE,MAAM,IAAI;AAC5B,YAAY,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;AACxD,SAAS;AACT,KAAK;AACL,CAAC;AACD,OAAO,CAAC,eAAe,GAAG,qBAAqB,CAAC,iBAAiB,CAAC;;"}
1
+ {"version":3,"file":"autoSignInStore.js","sources":["../../../../../src/client/utils/store/autoSignInStore.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.autoSignInStore = void 0;\nfunction defaultState() {\n return {\n active: false,\n };\n}\nconst autoSignInReducer = (state, action) => {\n switch (action.type) {\n case 'SET_USERNAME':\n return {\n ...state,\n username: action.value,\n };\n case 'SET_SESSION':\n return {\n ...state,\n session: action.value,\n };\n case 'START':\n return {\n ...state,\n active: true,\n };\n case 'RESET':\n return defaultState();\n default:\n return state;\n }\n};\nconst createAutoSignInStore = (reducer) => {\n let currentState = reducer(defaultState(), { type: 'RESET' });\n return {\n getState: () => currentState,\n dispatch: action => {\n currentState = reducer(currentState, action);\n },\n };\n};\nexports.autoSignInStore = createAutoSignInStore(autoSignInReducer);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,eAAe,GAAG,MAAM;AAChC,SAAS,YAAY,GAAG;AACxB,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,KAAK;AACrB,KAAK;AACL;AACA,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK;AAC7C,IAAI,QAAQ,MAAM,CAAC,IAAI;AACvB,QAAQ,KAAK,cAAc;AAC3B,YAAY,OAAO;AACnB,gBAAgB,GAAG,KAAK;AACxB,gBAAgB,QAAQ,EAAE,MAAM,CAAC,KAAK;AACtC,aAAa;AACb,QAAQ,KAAK,aAAa;AAC1B,YAAY,OAAO;AACnB,gBAAgB,GAAG,KAAK;AACxB,gBAAgB,OAAO,EAAE,MAAM,CAAC,KAAK;AACrC,aAAa;AACb,QAAQ,KAAK,OAAO;AACpB,YAAY,OAAO;AACnB,gBAAgB,GAAG,KAAK;AACxB,gBAAgB,MAAM,EAAE,IAAI;AAC5B,aAAa;AACb,QAAQ,KAAK,OAAO;AACpB,YAAY,OAAO,YAAY,EAAE;AACjC,QAAQ;AACR,YAAY,OAAO,KAAK;AACxB;AACA,CAAC;AACD,MAAM,qBAAqB,GAAG,CAAC,OAAO,KAAK;AAC3C,IAAI,IAAI,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACjE,IAAI,OAAO;AACX,QAAQ,QAAQ,EAAE,MAAM,YAAY;AACpC,QAAQ,QAAQ,EAAE,MAAM,IAAI;AAC5B,YAAY,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;AACxD,QAAQ,CAAC;AACT,KAAK;AACL,CAAC;AACD,OAAO,CAAC,eAAe,GAAG,qBAAqB,CAAC,iBAAiB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"signInStore.js","sources":["../../../../../src/client/utils/store/signInStore.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.persistSignInState = exports.signInStore = exports.resetActiveSignInState = void 0;\nexports.setActiveSignInState = setActiveSignInState;\nconst core_1 = require(\"@aws-amplify/core\");\n// Minutes until stored session invalidates is defaulted to 3 minutes\n// to maintain parity with Amazon Cognito user pools API behavior\nconst MS_TO_EXPIRY = 3 * 60 * 1000;\nconst TGT_STATE = 'CognitoSignInState';\nconst SIGN_IN_STATE_KEYS = {\n username: `${TGT_STATE}.username`,\n challengeName: `${TGT_STATE}.challengeName`,\n signInSession: `${TGT_STATE}.signInSession`,\n expiry: `${TGT_STATE}.expiry`,\n};\nconst signInReducer = (state, action) => {\n switch (action.type) {\n case 'SET_SIGN_IN_SESSION':\n (0, exports.persistSignInState)({ signInSession: action.value });\n return {\n ...state,\n signInSession: action.value,\n };\n case 'SET_SIGN_IN_STATE':\n (0, exports.persistSignInState)(action.value);\n return {\n ...action.value,\n };\n case 'SET_CHALLENGE_NAME':\n (0, exports.persistSignInState)({ challengeName: action.value });\n return {\n ...state,\n challengeName: action.value,\n };\n case 'SET_USERNAME':\n (0, exports.persistSignInState)({ username: action.value });\n return {\n ...state,\n username: action.value,\n };\n case 'SET_INITIAL_STATE':\n return getInitialState();\n case 'RESET_STATE':\n clearPersistedSignInState();\n return getDefaultState();\n // this state is never reachable\n default:\n return state;\n }\n};\nconst isExpired = (expiryDate) => {\n const expiryTimestamp = Number(expiryDate);\n const currentTimestamp = Date.now();\n return expiryTimestamp <= currentTimestamp;\n};\nconst resetActiveSignInState = () => {\n exports.signInStore.dispatch({ type: 'RESET_STATE' });\n};\nexports.resetActiveSignInState = resetActiveSignInState;\nconst clearPersistedSignInState = () => {\n for (const stateKey of Object.values(SIGN_IN_STATE_KEYS)) {\n core_1.syncSessionStorage.removeItem(stateKey);\n }\n};\nconst getDefaultState = () => ({\n username: undefined,\n challengeName: undefined,\n signInSession: undefined,\n});\n// Hydrate signInStore from syncSessionStorage if the session has not expired\nconst getInitialState = () => {\n const expiry = core_1.syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.expiry);\n if (!expiry || isExpired(expiry)) {\n clearPersistedSignInState();\n return getDefaultState();\n }\n const username = core_1.syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.username) ?? undefined;\n const challengeName = (core_1.syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.challengeName) ?? undefined);\n const signInSession = core_1.syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.signInSession) ?? undefined;\n return {\n username,\n challengeName,\n signInSession,\n };\n};\nconst createStore = reducer => {\n let currentState = reducer(getDefaultState(), { type: 'SET_INITIAL_STATE' });\n return {\n getState: () => currentState,\n dispatch: action => {\n currentState = reducer(currentState, action);\n },\n };\n};\nexports.signInStore = createStore(signInReducer);\nfunction setActiveSignInState(state) {\n exports.signInStore.dispatch({\n type: 'SET_SIGN_IN_STATE',\n value: state,\n });\n}\n// Save local state into Session Storage\nconst persistSignInState = ({ challengeName, signInSession, username, }) => {\n username && core_1.syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.username, username);\n challengeName &&\n core_1.syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.challengeName, challengeName);\n if (signInSession) {\n core_1.syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.signInSession, signInSession);\n // Updates expiry when session is passed\n core_1.syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.expiry, String(Date.now() + MS_TO_EXPIRY));\n }\n};\nexports.persistSignInState = persistSignInState;\n"],"names":[],"mappings":";;AACA;AACA;AACA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,KAAK;AACpB,KAAK,CAAC;AACN;AACA;AACA,MAAM,kBAAkB,GAAG,CAAC,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,GAAG,KAAK;AAC5E,IAAI,QAAQ,IAAI,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC;AACxF,IAAI,aAAa;AACjB,QAAQ,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,kBAAkB,CAAC,aAAa,EAAE,aAAa,CAAC;AAC1F,IAAI,IAAI,aAAa,EAAE;AACvB,QAAQ,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,kBAAkB,CAAC,aAAa,EAAE,aAAa,CAAC;AAC1F;AACA,QAAQ,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,YAAY,CAAC,CAAC;AACvG;AACA,CAAC;AACD,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;;"}
1
+ {"version":3,"file":"signInStore.js","sources":["../../../../../src/client/utils/store/signInStore.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.persistSignInState = exports.signInStore = exports.resetActiveSignInState = void 0;\nexports.setActiveSignInState = setActiveSignInState;\nconst core_1 = require(\"@aws-amplify/core\");\n// Minutes until stored session invalidates is defaulted to 3 minutes\n// to maintain parity with Amazon Cognito user pools API behavior\nconst MS_TO_EXPIRY = 3 * 60 * 1000;\nconst TGT_STATE = 'CognitoSignInState';\nconst SIGN_IN_STATE_KEYS = {\n username: `${TGT_STATE}.username`,\n challengeName: `${TGT_STATE}.challengeName`,\n signInSession: `${TGT_STATE}.signInSession`,\n expiry: `${TGT_STATE}.expiry`,\n};\nconst signInReducer = (state, action) => {\n switch (action.type) {\n case 'SET_SIGN_IN_SESSION':\n (0, exports.persistSignInState)({ signInSession: action.value });\n return {\n ...state,\n signInSession: action.value,\n };\n case 'SET_SIGN_IN_STATE':\n (0, exports.persistSignInState)(action.value);\n return {\n ...action.value,\n };\n case 'SET_CHALLENGE_NAME':\n (0, exports.persistSignInState)({ challengeName: action.value });\n return {\n ...state,\n challengeName: action.value,\n };\n case 'SET_USERNAME':\n (0, exports.persistSignInState)({ username: action.value });\n return {\n ...state,\n username: action.value,\n };\n case 'SET_INITIAL_STATE':\n return getInitialState();\n case 'RESET_STATE':\n clearPersistedSignInState();\n return getDefaultState();\n // this state is never reachable\n default:\n return state;\n }\n};\nconst isExpired = (expiryDate) => {\n const expiryTimestamp = Number(expiryDate);\n const currentTimestamp = Date.now();\n return expiryTimestamp <= currentTimestamp;\n};\nconst resetActiveSignInState = () => {\n exports.signInStore.dispatch({ type: 'RESET_STATE' });\n};\nexports.resetActiveSignInState = resetActiveSignInState;\nconst clearPersistedSignInState = () => {\n for (const stateKey of Object.values(SIGN_IN_STATE_KEYS)) {\n core_1.syncSessionStorage.removeItem(stateKey);\n }\n};\nconst getDefaultState = () => ({\n username: undefined,\n challengeName: undefined,\n signInSession: undefined,\n});\n// Hydrate signInStore from syncSessionStorage if the session has not expired\nconst getInitialState = () => {\n const expiry = core_1.syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.expiry);\n if (!expiry || isExpired(expiry)) {\n clearPersistedSignInState();\n return getDefaultState();\n }\n const username = core_1.syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.username) ?? undefined;\n const challengeName = (core_1.syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.challengeName) ?? undefined);\n const signInSession = core_1.syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.signInSession) ?? undefined;\n return {\n username,\n challengeName,\n signInSession,\n };\n};\nconst createStore = reducer => {\n let currentState = reducer(getDefaultState(), { type: 'SET_INITIAL_STATE' });\n return {\n getState: () => currentState,\n dispatch: action => {\n currentState = reducer(currentState, action);\n },\n };\n};\nexports.signInStore = createStore(signInReducer);\nfunction setActiveSignInState(state) {\n exports.signInStore.dispatch({\n type: 'SET_SIGN_IN_STATE',\n value: state,\n });\n}\n// Save local state into Session Storage\nconst persistSignInState = ({ challengeName, signInSession, username, }) => {\n username && core_1.syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.username, username);\n challengeName &&\n core_1.syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.challengeName, challengeName);\n if (signInSession) {\n core_1.syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.signInSession, signInSession);\n // Updates expiry when session is passed\n core_1.syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.expiry, String(Date.now() + MS_TO_EXPIRY));\n }\n};\nexports.persistSignInState = persistSignInState;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,sBAAsB,GAAG,MAAM;AAC1F,OAAO,CAAC,oBAAoB,GAAG,oBAAoB;AACnD,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C;AACA;AACA,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI;AAClC,MAAM,SAAS,GAAG,oBAAoB;AACtC,MAAM,kBAAkB,GAAG;AAC3B,IAAI,QAAQ,EAAE,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC;AACrC,IAAI,aAAa,EAAE,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC;AAC/C,IAAI,aAAa,EAAE,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC;AAC/C,IAAI,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC;AACjC,CAAC;AACD,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK;AACzC,IAAI,QAAQ,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js","sources":["../../../src/errors/AuthError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AuthError = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nclass AuthError extends utils_1.AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AuthError;\n Object.setPrototypeOf(this, AuthError.prototype);\n }\n}\nexports.AuthError = AuthError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,SAAS,GAAG,MAAM;AAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,SAAS,SAAS,OAAO,CAAC,YAAY,CAAC;AAC7C,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC;AACrB;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,SAAS;AACpC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC;AACxD;AACA;AACA,OAAO,CAAC,SAAS,GAAG,SAAS;;"}
1
+ {"version":3,"file":"AuthError.js","sources":["../../../src/errors/AuthError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AuthError = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nclass AuthError extends utils_1.AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AuthError;\n Object.setPrototypeOf(this, AuthError.prototype);\n }\n}\nexports.AuthError = AuthError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,SAAS,GAAG,MAAM;AAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,SAAS,SAAS,OAAO,CAAC,YAAY,CAAC;AAC7C,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC;AACrB;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,SAAS;AACpC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC;AACxD,IAAI;AACJ;AACA,OAAO,CAAC,SAAS,GAAG,SAAS;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"assertServiceError.js","sources":["../../../../src/errors/utils/assertServiceError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertServiceError = assertServiceError;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst AuthError_1 = require(\"../AuthError\");\nfunction assertServiceError(error) {\n if (!error ||\n error.name === 'Error' ||\n error instanceof TypeError) {\n throw new AuthError_1.AuthError({\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: error,\n });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;AAC3C,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,IAAI,CAAC,KAAK;AACd,QAAQ,KAAK,CAAC,IAAI,KAAK,OAAO;AAC9B,QAAQ,KAAK,YAAY,SAAS,EAAE;AACpC,QAAQ,MAAM,IAAI,WAAW,CAAC,SAAS,CAAC;AACxC,YAAY,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO;AAClD,YAAY,OAAO,EAAE,gCAAgC;AACrD,YAAY,eAAe,EAAE,KAAK;AAClC,SAAS,CAAC;AACV;AACA;;"}
1
+ {"version":3,"file":"assertServiceError.js","sources":["../../../../src/errors/utils/assertServiceError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertServiceError = assertServiceError;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst AuthError_1 = require(\"../AuthError\");\nfunction assertServiceError(error) {\n if (!error ||\n error.name === 'Error' ||\n error instanceof TypeError) {\n throw new AuthError_1.AuthError({\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: error,\n });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;AAC3C,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,IAAI,CAAC,KAAK;AACd,QAAQ,KAAK,CAAC,IAAI,KAAK,OAAO;AAC9B,QAAQ,KAAK,YAAY,SAAS,EAAE;AACpC,QAAQ,MAAM,IAAI,WAAW,CAAC,SAAS,CAAC;AACxC,YAAY,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO;AAClD,YAAY,OAAO,EAAE,gCAAgC;AACrD,YAAY,eAAe,EAAE,KAAK;AAClC,SAAS,CAAC;AACV,IAAI;AACJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"assertValidationError.js","sources":["../../../../src/errors/utils/assertValidationError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertValidationError = assertValidationError;\nconst AuthErrorStrings_1 = require(\"../../common/AuthErrorStrings\");\nconst AuthError_1 = require(\"../AuthError\");\nfunction assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = AuthErrorStrings_1.validationErrorMap[name];\n if (!assertion) {\n throw new AuthError_1.AuthError({ name, message, recoverySuggestion });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;AACrD,MAAM,kBAAkB,GAAG,OAAO,CAAC,+BAA+B,CAAC;AACnE,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;AAC3C,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE;AAChD,IAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC;AACvF,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9E;AACA;;"}
1
+ {"version":3,"file":"assertValidationError.js","sources":["../../../../src/errors/utils/assertValidationError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertValidationError = assertValidationError;\nconst AuthErrorStrings_1 = require(\"../../common/AuthErrorStrings\");\nconst AuthError_1 = require(\"../AuthError\");\nfunction assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = AuthErrorStrings_1.validationErrorMap[name];\n if (!assertion) {\n throw new AuthError_1.AuthError({ name, message, recoverySuggestion });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;AACrD,MAAM,kBAAkB,GAAG,OAAO,CAAC,+BAA+B,CAAC;AACnE,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;AAC3C,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE;AAChD,IAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC;AACvF,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9E,IAAI;AACJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/foundation/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deleteWebAuthnCredential = exports.listWebAuthnCredentials = void 0;\nvar listWebAuthnCredentials_1 = require(\"./listWebAuthnCredentials\");\nObject.defineProperty(exports, \"listWebAuthnCredentials\", { enumerable: true, get: function () { return listWebAuthnCredentials_1.listWebAuthnCredentials; } });\nvar deleteWebAuthnCredential_1 = require(\"./deleteWebAuthnCredential\");\nObject.defineProperty(exports, \"deleteWebAuthnCredential\", { enumerable: true, get: function () { return deleteWebAuthnCredential_1.deleteWebAuthnCredential; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,uBAAuB,GAAG,MAAM;AAC3E,IAAI,yBAAyB,GAAG,OAAO,CAAC,2BAA2B,CAAC;AACpE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,yBAAyB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,yBAAyB,CAAC,uBAAuB,CAAC,EAAE,EAAE,CAAC;AAC/J,IAAI,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC;AACtE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,0BAA0B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,0BAA0B,CAAC,wBAAwB,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/foundation/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deleteWebAuthnCredential = exports.listWebAuthnCredentials = void 0;\nvar listWebAuthnCredentials_1 = require(\"./listWebAuthnCredentials\");\nObject.defineProperty(exports, \"listWebAuthnCredentials\", { enumerable: true, get: function () { return listWebAuthnCredentials_1.listWebAuthnCredentials; } });\nvar deleteWebAuthnCredential_1 = require(\"./deleteWebAuthnCredential\");\nObject.defineProperty(exports, \"deleteWebAuthnCredential\", { enumerable: true, get: function () { return deleteWebAuthnCredential_1.deleteWebAuthnCredential; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,uBAAuB,GAAG,MAAM;AAC3E,IAAI,yBAAyB,GAAG,OAAO,CAAC,2BAA2B,CAAC;AACpE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,yBAAyB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,yBAAyB,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/J,IAAI,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC;AACtE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,0BAA0B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,0BAA0B,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/foundation/convert/base64url/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertBase64UrlToArrayBuffer = exports.convertArrayBufferToBase64Url = void 0;\nvar convertArrayBufferToBase64Url_1 = require(\"./convertArrayBufferToBase64Url\");\nObject.defineProperty(exports, \"convertArrayBufferToBase64Url\", { enumerable: true, get: function () { return convertArrayBufferToBase64Url_1.convertArrayBufferToBase64Url; } });\nvar convertBase64UrlToArrayBuffer_1 = require(\"./convertBase64UrlToArrayBuffer\");\nObject.defineProperty(exports, \"convertBase64UrlToArrayBuffer\", { enumerable: true, get: function () { return convertBase64UrlToArrayBuffer_1.convertBase64UrlToArrayBuffer; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,6BAA6B,GAAG,OAAO,CAAC,6BAA6B,GAAG,MAAM;AACtF,IAAI,+BAA+B,GAAG,OAAO,CAAC,iCAAiC,CAAC;AAChF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,+BAA+B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,+BAA+B,CAAC,6BAA6B,CAAC,EAAE,EAAE,CAAC;AACjL,IAAI,+BAA+B,GAAG,OAAO,CAAC,iCAAiC,CAAC;AAChF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,+BAA+B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,+BAA+B,CAAC,6BAA6B,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/foundation/convert/base64url/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertBase64UrlToArrayBuffer = exports.convertArrayBufferToBase64Url = void 0;\nvar convertArrayBufferToBase64Url_1 = require(\"./convertArrayBufferToBase64Url\");\nObject.defineProperty(exports, \"convertArrayBufferToBase64Url\", { enumerable: true, get: function () { return convertArrayBufferToBase64Url_1.convertArrayBufferToBase64Url; } });\nvar convertBase64UrlToArrayBuffer_1 = require(\"./convertBase64UrlToArrayBuffer\");\nObject.defineProperty(exports, \"convertBase64UrlToArrayBuffer\", { enumerable: true, get: function () { return convertBase64UrlToArrayBuffer_1.convertBase64UrlToArrayBuffer; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,6BAA6B,GAAG,OAAO,CAAC,6BAA6B,GAAG,MAAM;AACtF,IAAI,+BAA+B,GAAG,OAAO,CAAC,iCAAiC,CAAC;AAChF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,+BAA+B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,+BAA+B,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAAE,CAAC;AACjL,IAAI,+BAA+B,GAAG,OAAO,CAAC,iCAAiC,CAAC;AAChF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,+BAA+B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,+BAA+B,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/foundation/convert/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertBase64UrlToArrayBuffer = exports.convertArrayBufferToBase64Url = void 0;\nvar base64url_1 = require(\"./base64url\");\nObject.defineProperty(exports, \"convertArrayBufferToBase64Url\", { enumerable: true, get: function () { return base64url_1.convertArrayBufferToBase64Url; } });\nObject.defineProperty(exports, \"convertBase64UrlToArrayBuffer\", { enumerable: true, get: function () { return base64url_1.convertBase64UrlToArrayBuffer; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,6BAA6B,GAAG,OAAO,CAAC,6BAA6B,GAAG,MAAM;AACtF,IAAI,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;AACxC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,+BAA+B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,6BAA6B,CAAC,EAAE,EAAE,CAAC;AAC7J,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,+BAA+B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,6BAA6B,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/foundation/convert/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertBase64UrlToArrayBuffer = exports.convertArrayBufferToBase64Url = void 0;\nvar base64url_1 = require(\"./base64url\");\nObject.defineProperty(exports, \"convertArrayBufferToBase64Url\", { enumerable: true, get: function () { return base64url_1.convertArrayBufferToBase64Url; } });\nObject.defineProperty(exports, \"convertBase64UrlToArrayBuffer\", { enumerable: true, get: function () { return base64url_1.convertBase64UrlToArrayBuffer; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,6BAA6B,GAAG,OAAO,CAAC,6BAA6B,GAAG,MAAM;AACtF,IAAI,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;AACxC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,+BAA+B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7J,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,+BAA+B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../../../src/foundation/factories/serviceClients/cognitoIdentityProvider/constants.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_SERVICE_CLIENT_API_CONFIG = void 0;\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst constants_1 = require(\"../../../constants\");\nexports.DEFAULT_SERVICE_CLIENT_API_CONFIG = {\n service: constants_1.COGNITO_IDP_SERVICE_NAME,\n retryDecider: (0, aws_client_utils_1.getRetryDecider)(aws_client_utils_1.parseJsonError),\n computeDelay: aws_client_utils_1.jitteredBackoff,\n get userAgentValue() {\n return (0, utils_1.getAmplifyUserAgent)();\n },\n cache: 'no-store',\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,iCAAiC,GAAG,MAAM;AAClD,MAAM,kBAAkB,GAAG,OAAO,CAAC,8CAA8C,CAAC;AAClF,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;AACjD,OAAO,CAAC,iCAAiC,GAAG;AAC5C,IAAI,OAAO,EAAE,WAAW,CAAC,wBAAwB;AACjD,IAAI,YAAY,EAAE,IAAI,kBAAkB,CAAC,eAAe,EAAE,kBAAkB,CAAC,cAAc,CAAC;AAC5F,IAAI,YAAY,EAAE,kBAAkB,CAAC,eAAe;AACpD,IAAI,IAAI,cAAc,GAAG;AACzB,QAAQ,OAAO,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACjD,KAAK;AACL,IAAI,KAAK,EAAE,UAAU;AACrB,CAAC;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../../../src/foundation/factories/serviceClients/cognitoIdentityProvider/constants.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_SERVICE_CLIENT_API_CONFIG = void 0;\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst constants_1 = require(\"../../../constants\");\nexports.DEFAULT_SERVICE_CLIENT_API_CONFIG = {\n service: constants_1.COGNITO_IDP_SERVICE_NAME,\n retryDecider: (0, aws_client_utils_1.getRetryDecider)(aws_client_utils_1.parseJsonError),\n computeDelay: aws_client_utils_1.jitteredBackoff,\n get userAgentValue() {\n return (0, utils_1.getAmplifyUserAgent)();\n },\n cache: 'no-store',\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,iCAAiC,GAAG,MAAM;AAClD,MAAM,kBAAkB,GAAG,OAAO,CAAC,8CAA8C,CAAC;AAClF,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;AACjD,OAAO,CAAC,iCAAiC,GAAG;AAC5C,IAAI,OAAO,EAAE,WAAW,CAAC,wBAAwB;AACjD,IAAI,YAAY,EAAE,IAAI,kBAAkB,CAAC,eAAe,EAAE,kBAAkB,CAAC,cAAc,CAAC;AAC5F,IAAI,YAAY,EAAE,kBAAkB,CAAC,eAAe;AACpD,IAAI,IAAI,cAAc,GAAG;AACzB,QAAQ,OAAO,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACjD,IAAI,CAAC;AACL,IAAI,KAAK,EAAE,UAAU;AACrB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"createSignUpClient.js","sources":["../../../../../../src/foundation/factories/serviceClients/cognitoIdentityProvider/createSignUpClient.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createSignUpClient = exports.createSignUpClientDeserializer = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst composers_1 = require(\"@aws-amplify/core/internals/aws-client-utils/composers\");\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst AuthErrorStrings_1 = require(\"../../../../common/AuthErrorStrings\");\nconst AuthError_1 = require(\"../../../../errors/AuthError\");\nconst validation_1 = require(\"../../../../errors/types/validation\");\nconst assertServiceError_1 = require(\"../../../../errors/utils/assertServiceError\");\nconst errors_1 = require(\"../../../../providers/cognito/types/errors\");\nconst serde_1 = require(\"./shared/serde\");\nconst handler_1 = require(\"./shared/handler\");\nconst constants_1 = require(\"./constants\");\nconst createSignUpClientDeserializer = () => async (response) => {\n if (response.statusCode >= 300) {\n const error = await (0, aws_client_utils_1.parseJsonError)(response);\n (0, assertServiceError_1.assertServiceError)(error);\n if (\n // Missing Password Error\n // 1 validation error detected: Value at 'password'failed to satisfy constraint: Member must not be null\n error.name === errors_1.SignUpException.InvalidParameterException &&\n /'password'/.test(error.message) &&\n /Member must not be null/.test(error.message)) {\n const name = validation_1.AuthValidationErrorCode.EmptySignUpPassword;\n const { message, recoverySuggestion } = AuthErrorStrings_1.validationErrorMap[name];\n throw new AuthError_1.AuthError({\n name,\n message,\n recoverySuggestion,\n });\n }\n throw new AuthError_1.AuthError({ name: error.name, message: error.message });\n }\n return (0, aws_client_utils_1.parseJsonBody)(response);\n};\nexports.createSignUpClientDeserializer = createSignUpClientDeserializer;\nconst createSignUpClient = (config) => (0, composers_1.composeServiceApi)(handler_1.cognitoUserPoolTransferHandler, (0, serde_1.createUserPoolSerializer)('SignUp'), (0, exports.createSignUpClientDeserializer)(), {\n ...constants_1.DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\nexports.createSignUpClient = createSignUpClient;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,8BAA8B,GAAG,MAAM;AAC5E;AACA;AACA,MAAM,WAAW,GAAG,OAAO,CAAC,wDAAwD,CAAC;AACrF,MAAM,kBAAkB,GAAG,OAAO,CAAC,8CAA8C,CAAC;AAClF,MAAM,kBAAkB,GAAG,OAAO,CAAC,qCAAqC,CAAC;AACzE,MAAM,WAAW,GAAG,OAAO,CAAC,8BAA8B,CAAC;AAC3D,MAAM,YAAY,GAAG,OAAO,CAAC,qCAAqC,CAAC;AACnE,MAAM,oBAAoB,GAAG,OAAO,CAAC,6CAA6C,CAAC;AACnF,MAAM,QAAQ,GAAG,OAAO,CAAC,4CAA4C,CAAC;AACtE,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;AAC1C,MAAM,8BAA8B,GAAG,MAAM,OAAO,QAAQ,KAAK;AACjE,IAAI,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,EAAE;AACpC,QAAQ,MAAM,KAAK,GAAG,MAAM,IAAI,kBAAkB,CAAC,cAAc,EAAE,QAAQ,CAAC;AAC5E,QAAQ,IAAI,oBAAoB,CAAC,kBAAkB,EAAE,KAAK,CAAC;AAC3D,QAAQ;AACR;AACA;AACA,QAAQ,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,eAAe,CAAC,yBAAyB;AACzE,YAAY,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;AAC5C,YAAY,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;AAC3D,YAAY,MAAM,IAAI,GAAG,YAAY,CAAC,uBAAuB,CAAC,mBAAmB;AACjF,YAAY,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC;AAC/F,YAAY,MAAM,IAAI,WAAW,CAAC,SAAS,CAAC;AAC5C,gBAAgB,IAAI;AACpB,gBAAgB,OAAO;AACvB,gBAAgB,kBAAkB;AAClC,aAAa,CAAC;AACd;AACA,QAAQ,MAAM,IAAI,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;AACrF;AACA,IAAI,OAAO,IAAI,kBAAkB,CAAC,aAAa,EAAE,QAAQ,CAAC;AAC1D,CAAC;AACD,OAAO,CAAC,8BAA8B,GAAG,8BAA8B;AACvE,MAAM,kBAAkB,GAAG,CAAC,MAAM,KAAK,IAAI,WAAW,CAAC,iBAAiB,EAAE,SAAS,CAAC,8BAA8B,EAAE,IAAI,OAAO,CAAC,wBAAwB,EAAE,QAAQ,CAAC,EAAE,IAAI,OAAO,CAAC,8BAA8B,GAAG,EAAE;AACpN,IAAI,GAAG,WAAW,CAAC,iCAAiC;AACpD,IAAI,GAAG,MAAM;AACb,CAAC,CAAC;AACF,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;;"}
1
+ {"version":3,"file":"createSignUpClient.js","sources":["../../../../../../src/foundation/factories/serviceClients/cognitoIdentityProvider/createSignUpClient.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createSignUpClient = exports.createSignUpClientDeserializer = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst composers_1 = require(\"@aws-amplify/core/internals/aws-client-utils/composers\");\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst AuthErrorStrings_1 = require(\"../../../../common/AuthErrorStrings\");\nconst AuthError_1 = require(\"../../../../errors/AuthError\");\nconst validation_1 = require(\"../../../../errors/types/validation\");\nconst assertServiceError_1 = require(\"../../../../errors/utils/assertServiceError\");\nconst errors_1 = require(\"../../../../providers/cognito/types/errors\");\nconst serde_1 = require(\"./shared/serde\");\nconst handler_1 = require(\"./shared/handler\");\nconst constants_1 = require(\"./constants\");\nconst createSignUpClientDeserializer = () => async (response) => {\n if (response.statusCode >= 300) {\n const error = await (0, aws_client_utils_1.parseJsonError)(response);\n (0, assertServiceError_1.assertServiceError)(error);\n if (\n // Missing Password Error\n // 1 validation error detected: Value at 'password'failed to satisfy constraint: Member must not be null\n error.name === errors_1.SignUpException.InvalidParameterException &&\n /'password'/.test(error.message) &&\n /Member must not be null/.test(error.message)) {\n const name = validation_1.AuthValidationErrorCode.EmptySignUpPassword;\n const { message, recoverySuggestion } = AuthErrorStrings_1.validationErrorMap[name];\n throw new AuthError_1.AuthError({\n name,\n message,\n recoverySuggestion,\n });\n }\n throw new AuthError_1.AuthError({ name: error.name, message: error.message });\n }\n return (0, aws_client_utils_1.parseJsonBody)(response);\n};\nexports.createSignUpClientDeserializer = createSignUpClientDeserializer;\nconst createSignUpClient = (config) => (0, composers_1.composeServiceApi)(handler_1.cognitoUserPoolTransferHandler, (0, serde_1.createUserPoolSerializer)('SignUp'), (0, exports.createSignUpClientDeserializer)(), {\n ...constants_1.DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\nexports.createSignUpClient = createSignUpClient;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,8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