diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 8abf192fb41..410f3adec50 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -76,9 +76,6 @@ PODS: - hermes-engine (0.72.14): - hermes-engine/Pre-built (= 0.72.14) - hermes-engine/Pre-built (0.72.14) - - io-react-native-secure-storage (0.1.1): - - RCT-Folly (= 2021.07.22.00) - - React-Core - jail-monkey (2.8.0): - React-Core - JOSESwift (2.4.0) @@ -103,7 +100,7 @@ PODS: - Alamofire (~> 5.9.1) - RCT-Folly (= 2021.07.22.00) - React-Core - - pagopa-io-react-native-integrity (0.3.0): + - pagopa-io-react-native-integrity (0.3.1): - RCT-Folly (= 2021.07.22.00) - React-Core - SwiftCBOR @@ -113,6 +110,9 @@ PODS: - React-Core - pagopa-io-react-native-login-utils (1.0.8): - React-Core + - pagopa-io-react-native-secure-storage (0.2.0): + - RCT-Folly (= 2021.07.22.00) + - React-Core - pagopa-react-native-zendesk (0.3.29): - RCT-Folly (= 2021.07.22.00) - React-Core @@ -708,7 +708,6 @@ DEPENDENCIES: - FlipperKit/SKIOSNetworkPlugin (= 0.182.0) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - - io-react-native-secure-storage (from `../node_modules/io-react-native-secure-storage`) - jail-monkey (from `../node_modules/jail-monkey`) - libevent (~> 2.1.12) - lottie-react-native (from `../node_modules/lottie-react-native`) @@ -720,6 +719,7 @@ DEPENDENCIES: - "pagopa-io-react-native-integrity (from `../node_modules/@pagopa/io-react-native-integrity`)" - "pagopa-io-react-native-jwt (from `../node_modules/@pagopa/io-react-native-jwt`)" - "pagopa-io-react-native-login-utils (from `../node_modules/@pagopa/io-react-native-login-utils`)" + - "pagopa-io-react-native-secure-storage (from `../node_modules/@pagopa/io-react-native-secure-storage`)" - "pagopa-react-native-zendesk (from `../node_modules/@pagopa/io-react-native-zendesk`)" - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) @@ -850,8 +850,6 @@ EXTERNAL SOURCES: :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" hermes-engine: :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" - io-react-native-secure-storage: - :path: "../node_modules/io-react-native-secure-storage" jail-monkey: :path: "../node_modules/jail-monkey" lottie-react-native: @@ -870,6 +868,8 @@ EXTERNAL SOURCES: :path: "../node_modules/@pagopa/io-react-native-jwt" pagopa-io-react-native-login-utils: :path: "../node_modules/@pagopa/io-react-native-login-utils" + pagopa-io-react-native-secure-storage: + :path: "../node_modules/@pagopa/io-react-native-secure-storage" pagopa-react-native-zendesk: :path: "../node_modules/@pagopa/io-react-native-zendesk" RCT-Folly: @@ -1044,7 +1044,6 @@ SPEC CHECKSUMS: fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b hermes-engine: b213bace5f31766ad1434d2d9b2cbf04cf92a2b6 - io-react-native-secure-storage: 5e6f84d27ead13de84f2014ecc767bffdc3e97e9 jail-monkey: a71b35d482a70ecba844a90f002994012cf12a5d JOSESwift: 7ff178bb9173ff42c6e990929a9f2fa702a34f69 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 @@ -1056,9 +1055,10 @@ SPEC CHECKSUMS: pagopa-io-react-native-cieid: d58f2bf3581fe20e10de735b376652a9221f0493 pagopa-io-react-native-crypto: 6aa9f33e4bf64ef420ad97c720c1ad0f876cd470 pagopa-io-react-native-http-client: cbdfb83c92432efb0de22b7c3c85cffa391870f8 - pagopa-io-react-native-integrity: ca77804cefb1cd75d04053652472bcb938ce4b18 + pagopa-io-react-native-integrity: f7445d78f6239fddd4b22baa8c30a08d55893930 pagopa-io-react-native-jwt: 27f6cb1ea58ea1df6778c67f23a932b90dc7e9a2 pagopa-io-react-native-login-utils: 090a98354cdbbf176059a1aa4163120468ee4356 + pagopa-io-react-native-secure-storage: 5cd527b1b140a4fe3eae3b9c9b6db35780bc81d1 pagopa-react-native-zendesk: 60a26f8a8072234789c34bb7c8a769c156eb57dc RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: 264adaca1d8b1a9c078761891898d4142df05313 diff --git a/package.json b/package.json index d04edcc467a..89395ddc819 100644 --- a/package.json +++ b/package.json @@ -114,9 +114,10 @@ "@pagopa/io-react-native-cieid": "^0.3.5", "@pagopa/io-react-native-crypto": "^0.3.0", "@pagopa/io-react-native-http-client": "1.0.5", - "@pagopa/io-react-native-integrity": "^0.3.0", + "@pagopa/io-react-native-integrity": "^0.3.1", "@pagopa/io-react-native-jwt": "^1.3.0", "@pagopa/io-react-native-login-utils": "^1.0.8", + "@pagopa/io-react-native-secure-storage": "^0.2.0", "@pagopa/io-react-native-wallet": "^0.26.0", "@pagopa/io-react-native-zendesk": "^0.3.29", "@pagopa/react-native-cie": "^1.3.0", @@ -148,7 +149,6 @@ "front-matter": "^4.0.2", "hastscript": "^7.0.2", "hoist-non-react-statics": "^3.0.1", - "io-react-native-secure-storage": "^0.1.1", "io-ts": "^2.2.16", "jail-monkey": "^2.8.0", "jwk-thumbprint": "^0.1.4", diff --git a/ts/features/itwallet/common/store/storages/itwSecureStorage.ts b/ts/features/itwallet/common/store/storages/itwSecureStorage.ts index 44e4313e098..50f0e0ea8e1 100644 --- a/ts/features/itwallet/common/store/storages/itwSecureStorage.ts +++ b/ts/features/itwallet/common/store/storages/itwSecureStorage.ts @@ -1,4 +1,4 @@ -import * as SecureStorage from "io-react-native-secure-storage"; +import * as SecureStorage from "@pagopa/io-react-native-secure-storage"; import { type Storage } from "redux-persist"; export default function itwCreateSecureStorage(): Storage { diff --git a/ts/features/itwallet/common/utils/itwIntegrityUtils.ts b/ts/features/itwallet/common/utils/itwIntegrityUtils.ts index b18cb444090..d542144c7ff 100644 --- a/ts/features/itwallet/common/utils/itwIntegrityUtils.ts +++ b/ts/features/itwallet/common/utils/itwIntegrityUtils.ts @@ -1,4 +1,4 @@ -import { generate, sign } from "@pagopa/io-react-native-crypto"; +import { sign } from "@pagopa/io-react-native-crypto"; import { decodeAssertion, generateHardwareKey, @@ -11,9 +11,9 @@ import { } from "@pagopa/io-react-native-integrity"; import { IntegrityContext } from "@pagopa/io-react-native-wallet"; import { Platform } from "react-native"; -import uuid from "react-native-uuid"; import sha from "sha.js"; import { addPadding, removePadding } from "@pagopa/io-react-native-jwt"; +import uuid from "react-native-uuid"; import { itwGoogleCloudProjectNumber } from "../../../../config"; /** @@ -63,11 +63,9 @@ const generateIntegrityHardwareKeyTag = () => const key = await generateHardwareKey(); return removePadding(key); }, - android: async () => { - const keyTag = uuid.v4().toString(); - await generate(keyTag); - return keyTag; - }, + android: async () => + // Here we generate a random uuid but the key is generated by getAttestation method of io-react-native-integrity package. + uuid.v4().toString(), default: () => Promise.reject(new Error("Unsupported platform")) })(); diff --git a/yarn.lock b/yarn.lock index 008f11443fd..411facc9f30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2259,10 +2259,10 @@ dependencies: auto-changelog "^2.4.0" -"@pagopa/io-react-native-integrity@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@pagopa/io-react-native-integrity/-/io-react-native-integrity-0.3.0.tgz#ec0808f308f0dc7b163febdbfa528819b1730c2d" - integrity sha512-K9omm939IhhuKBopdtDsDLeh6k9XZPgf03WlHnuiFtxo2rdfAUlWj8Fq9njpyT0ovmwDfP12PtRYSDFzkYH5Lg== +"@pagopa/io-react-native-integrity@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@pagopa/io-react-native-integrity/-/io-react-native-integrity-0.3.1.tgz#4dc23b221452b4101ea7a5bf35aedbe2e5a3a5fe" + integrity sha512-ZQP58OSLSus8LbFRa8jHtGo2BoR2Jn8lY1SirhBCfk9qo2qLcwRwanZ5T/tzO9inFOaTxPCvPu7uMdSdi8uRUQ== "@pagopa/io-react-native-jwt@^1.3.0": version "1.3.0" @@ -2277,6 +2277,11 @@ resolved "https://registry.yarnpkg.com/@pagopa/io-react-native-login-utils/-/io-react-native-login-utils-1.0.8.tgz#dc5911f756cbf9fa76529041c1422aaecd85c8b2" integrity sha512-gQY3Bkqtov0i9bZ3CV9ukPQYn9kOP6CaxUfbIyf1ZPOvXqAvDSqcbiM/Bdzkp3DneCrfvPMl9mkZ23af4Tu0fQ== +"@pagopa/io-react-native-secure-storage@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@pagopa/io-react-native-secure-storage/-/io-react-native-secure-storage-0.2.0.tgz#386982f350fcefa7bf8dc56e26ff390a9c94db03" + integrity sha512-nPdYOKa9DAMtmPanIOwyKzOJ6JpBINfLgOp3wzVT7pCOJPRo0FYHBwyt0nxrKufE42rz9z9Sh8K7Y0faB0kuMw== + "@pagopa/io-react-native-wallet@^0.26.0": version "0.26.0" resolved "https://registry.yarnpkg.com/@pagopa/io-react-native-wallet/-/io-react-native-wallet-0.26.0.tgz#01ccf96e2be5e99643159322d5e21c8b89fb9ca7" @@ -8865,11 +8870,6 @@ invariant@*, invariant@2.2.4, invariant@^2.2.2, invariant@^2.2.4: dependencies: loose-envify "^1.0.0" -io-react-native-secure-storage@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/io-react-native-secure-storage/-/io-react-native-secure-storage-0.1.1.tgz#c1fb28125f6c9f8f1b7436198fab726f4ae790ef" - integrity sha512-ceBQImvJoxGoyD5tDZ9E0SqDb/9CKPSR5XrMfDDBJ5topKDXCUkC9tiuEv/RYhOOzLbaLR7qvvkEtla5fcnHmg== - io-ts@^2.2.16: version "2.2.20" resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-2.2.20.tgz#be42b75f6668a2c44f706f72ee6e4c906777c7f5"