From bfff9e0dcb94aececdbc70f4dfd0a6d0cf4e2e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentZ?= <53896462+zail59@users.noreply.github.com> Date: Thu, 25 Jul 2024 14:55:59 +0000 Subject: [PATCH 1/3] fix: atob for jwt-decode --- package.json | 3 ++- src/utils/jwt.tsx | 1 + yarn.lock | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9622b8f..8fc388b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cryptr/cryptr-react-native", - "version": "1.0.1", + "version": "1.0.2", "description": "React Native SDK for Cryptr Authentication", "main": "lib/commonjs/index", "module": "lib/module/index", @@ -156,6 +156,7 @@ ] }, "dependencies": { + "core-js": "^3.37.1", "crypto-js": "^4.2.0", "jwt-decode": "^4.0.0", "react-native-uuid": "^2.0.2" diff --git a/src/utils/jwt.tsx b/src/utils/jwt.tsx index b79dcc0..0ae2650 100644 --- a/src/utils/jwt.tsx +++ b/src/utils/jwt.tsx @@ -1,3 +1,4 @@ +import 'core-js/stable/atob'; import { jwtDecode } from 'jwt-decode'; import { JWT, RS256 } from './constants'; import type { PreparedCryptrConfig } from './interfaces'; diff --git a/yarn.lock b/yarn.lock index b92ef0c..fcb31c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1728,6 +1728,7 @@ __metadata: "@types/jest": ^29.5.12 "@types/jwt-decode": ^3.1.0 "@types/react": ^18.2.44 + core-js: ^3.37.1 crypto-js: ^4.2.0 del-cli: ^5.1.0 eslint: ^8.51.0 @@ -4701,6 +4702,13 @@ __metadata: checksum: 5e7430329358bced08c30950512d2081aea0a5652b4c5892cbb3c4a6db05b0d3893a191a955162a07fdb5f4fe74e61b6429fdb503f54e062336d76e43c9555d9 languageName: node linkType: hard + +"core-js@npm:^3.37.1": + version: 3.37.1 + resolution: "core-js@npm:3.37.1" + checksum: 2d58a5c599f05c3e04abc8bc5e64b88eb17d914c0f552f670fb800afa74ec54b4fcc7f231ad6bd45badaf62c0fb0ce30e6fe89cedb6bb6d54e6f19115c3c17ff + languageName: node + linkType: hard "core-util-is@npm:~1.0.0": version: 1.0.3 From a12693d109fafbd02a47a5342444ab8ea1fd3740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentZ?= <53896462+zail59@users.noreply.github.com> Date: Thu, 25 Jul 2024 17:07:07 +0200 Subject: [PATCH 2/3] Update yarn.lock From f18468a46243205664517822099a1074b3199860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentZ?= <53896462+zail59@users.noreply.github.com> Date: Thu, 25 Jul 2024 17:07:59 +0200 Subject: [PATCH 3/3] Update yarn.lock --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index fcb31c4..23877c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4702,7 +4702,7 @@ __metadata: checksum: 5e7430329358bced08c30950512d2081aea0a5652b4c5892cbb3c4a6db05b0d3893a191a955162a07fdb5f4fe74e61b6429fdb503f54e062336d76e43c9555d9 languageName: node linkType: hard - + "core-js@npm:^3.37.1": version: 3.37.1 resolution: "core-js@npm:3.37.1"