Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 80243e0

Browse files
authored
Release/v0.3.0 beta (#11)
* remove query param value encoding * change version to beta * update podfile lock * ensure npm login before publish * update version using release-it * updated podfile * update testing related to latest changes (no more encoding + google sloable * last few changes * Squashed commit of the following: commit 10ac28d Author: Thibaud RENAUX <[email protected]> Date: Tue Jul 11 09:54:47 2023 +0200 Create node.js.yml (#12) * Create node.js.yml * Update .github/workflows/node.js.yml * use fake timers on jest * updategithub workflow
1 parent 10ac28d commit 80243e0

File tree

9 files changed

+8280
-8052
lines changed

9 files changed

+8280
-8052
lines changed

.github/workflows/node.js.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,19 @@ on:
1111

1212
jobs:
1313
build:
14-
14+
name: Lint + Test + build
1515
runs-on: ubuntu-latest
16-
17-
strategy:
18-
matrix:
19-
node-version: [16.x]
20-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21-
2216
steps:
2317
- uses: actions/checkout@v3
24-
- name: Use Node.js ${{ matrix.node-version }}
18+
- name: Using Node.js 16.4.0
2519
uses: actions/setup-node@v3
2620
with:
27-
node-version: ${{ matrix.node-version }}
28-
cache: 'npm'
21+
node-version: 16.4.0
2922
- name: Install dependencies
3023
run: yarn --prefer-offline
3124
- name: Linting
3225
run: yarn lint
3326
- name: Test
3427
run: npm test
3528
- name: build
36-
run: yarn prepare
29+
run: yarn prepare

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- boost-for-react-native (1.63.0)
3-
- cryptr-cryptr-react-native (0.3.0-alpha):
3+
- cryptr-cryptr-react-native (0.3.0):
44
- React-Core
55
- DoubleConversion (1.1.6)
66
- FBLazyVector (0.63.5)
@@ -342,7 +342,7 @@ EXTERNAL SOURCES:
342342

343343
SPEC CHECKSUMS:
344344
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
345-
cryptr-cryptr-react-native: 59f40b03159774d2e76f2e6ed7963b7b912182e4
345+
cryptr-cryptr-react-native: ff44a530cec41f6804757cf87279969b0949334a
346346
DoubleConversion: cde416483dac037923206447da6e1454df403714
347347
FBLazyVector: 352a8ca9bbc8e2f097d680747a8c97ecef12d469
348348
FBReactNativeSpec: 7dfb84f624136a45727c813ed21d130cd3e61beb

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cryptr/cryptr-react-native",
3-
"version": "0.3.0-alpha",
3+
"version": "0.3.0",
44
"description": "React Native SDK for Cryptr Authentication",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",
@@ -27,7 +27,7 @@
2727
"typescript": "tsc --noEmit",
2828
"lint": "eslint \"**/*.{js,ts,tsx}\"",
2929
"prepare": "bob build",
30-
"release": "release-it",
30+
"release": "npm login && npm ping && npm whoami && release-it",
3131
"example": "yarn --cwd example",
3232
"ios:example": "cd example && yarn ios",
3333
"android:example": "cd example && yarn android",
@@ -97,7 +97,8 @@
9797
],
9898
"setupFilesAfterEnv": [
9999
"@testing-library/jest-native/extend-expect"
100-
]
100+
],
101+
"timers": "fake"
101102
},
102103
"commitlint": {
103104
"extends": [

src/__tests__/components/CryptrGatewayButton.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ describe('CryptrGatewayButton', () => {
354354
expect.anything()
355355
);
356356
expect(startSecuredViewFn).toHaveBeenCalledWith(
357-
expect.stringContaining('email=john%2540company-domain.com'),
357+
expect.stringContaining('email=john%40company-domain.com'),
358358
false,
359359
expect.anything(),
360360
expect.anything()

src/__tests__/utils/apiHelpers.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe('apiHelpers#sloAfterRevokeTokenUrl/2', () => {
161161
let url = sloAfterRevokeTokenUrl(config, sloCode);
162162

163163
expect(url).toEqual(
164-
'https://cryptr.authent.me/api/v1/tenants/shark-academy/123-aze/oauth/token/slo-after-revoke-token?slo_code=remove_me&target_url=cryptr%253A%252F%252Fapp'
164+
'https://cryptr.authent.me/api/v1/tenants/shark-academy/123-aze/oauth/token/slo-after-revoke-token?slo_code=remove_me&target_url=cryptr%3A%2F%2Fapp'
165165
);
166166
});
167167
});

src/__tests__/utils/helpers.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ describe('helpers#canProcessSloCode/2', () => {
301301
it('returns false if slo_code, right platform but google ips', () => {
302302
expect(
303303
canProcessSloCode({ ips: 'google' }, 'slo_code', 'android')
304-
).toBeFalsy();
304+
).toBeTruthy();
305305
});
306306

307307
it('returns true if string slo_code and ips not google and compatible platform', () => {

src/utils/apiHelpers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const urlBuilder = (
1515
let url = new URL(urlParts.join('/'));
1616
if (queryParams) {
1717
queryParams.forEach((queryParam) => {
18-
url.searchParams.append(queryParam[0], encodeURIComponent(queryParam[1]));
18+
url.searchParams.append(queryParam[0], queryParam[1]);
1919
});
2020
}
2121

src/utils/helpers.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,11 @@ export const canProcessSloCode = (
148148
platform = Platform.OS
149149
): boolean => {
150150
let ips = access_token_fields.ips;
151-
console.debug(ips);
152151
return (
153-
slo_code !== undefined && slo_code !== '' && platform !== 'ios'
152+
slo_code !== undefined &&
153+
slo_code !== '' &&
154+
platform !== 'ios' &&
155+
ips !== 'incompatible_ips'
154156
// &&
155157
// ips !== 'google'
156158
);

yarn.lock

Lines changed: 8262 additions & 8030 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)