Skip to content

Commit

Permalink
Added customObject to PowerAuthActivationStatus (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
kober32 authored Feb 23, 2024
1 parent d2ded74 commit af34a2f
Show file tree
Hide file tree
Showing 20 changed files with 3,571 additions and 3,884 deletions.
3 changes: 1 addition & 2 deletions .deploy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
"react-native": "*"
},
"devDependencies": {
"@types/react-native": "0.70.0",
"lodash": "^4.17.21",
"react-native": "0.71.3"
"react-native": "^0.73.4"
}
}
42 changes: 21 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Setup Java 11
uses: actions/setup-java@v3
uses: actions/checkout@v4
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
cache: 'gradle'
- name: Use Node.js 16
uses: actions/setup-node@v3
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- name: Setup NPM tools
run: npm install -g pod-install && npm install -g react-native && npm install -g typescript
- name: Build native Android libraries
Expand All @@ -36,17 +36,17 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Setup Java 11
uses: actions/setup-java@v3
uses: actions/checkout@v4
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
cache: 'gradle'
- name: Use Node.js 16
uses: actions/setup-node@v3
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- name: Setup NPM tools
run: npm install -g pod-install && npm install -g react-native && npm install -g typescript
- name: Build native iOS libraries
Expand All @@ -57,17 +57,17 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Setup Java 11
uses: actions/setup-java@v3
uses: actions/checkout@v4
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
cache: 'gradle'
- name: Use Node.js 16
uses: actions/setup-node@v3
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- name: Setup NPM tools
run: npm install -g pod-install && npm install -g react-native && npm install -g typescript
- name: Compile sources
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ The documentation is available at the [Wultra Developer Portal](https://develope

| Version | React-Native<sup>1</sup> | Native SDK | Server version | Support Status |
|---------|-----------------|--------------|----------------|-------------------|
| `2.4.x` | `0.71+` | `1.7.x` | `0.24+` | Fully supported |
| `2.5.x` | `0.73+` | `1.7.x` | `0.24+` | Fully supported |
| `2.4.x` | `0.71+` | `1.7.x` | `0.24+` | Security bugfixes |
| `2.3.x` | `0.64` - `0.70` | `1.7.x` | `0.24+` | Security bugfixes |
| `2.2.x` | | `1.6.x` | `0.24+` | Not supported |

Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ ext {
//
PowerAuthSdkRN_kotlinVersion = "1.7.0"
PowerAuthSdkRN_minSdkVersion = 21
PowerAuthSdkRN_targetSdkVersion = 31
PowerAuthSdkRN_compileSdkVersion = 31
PowerAuthSdkRN_targetSdkVersion = 33
PowerAuthSdkRN_compileSdkVersion = 33
PowerAuthSdkRN_ndkversion = "21.4.7075529"
PowerAuthSdkRN_reactNativeVersion = "0.71.6"
PowerAuthSdkRN_reactNativeVersion = "0.73.4"
}

buildscript {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ public void onActivationStatusSucceed(ActivationStatus status) {
map.putInt("failCount", status.failCount);
map.putInt("maxFailCount", status.maxFailCount);
map.putInt("remainingAttempts", status.getRemainingAttempts());
map.putMap("customObject", Arguments.makeNativeMap(status.getCustomObject()));
promise.resolve(map);
}

Expand Down
2 changes: 1 addition & 1 deletion docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ React Native PowerAuth Mobile SDK is distributed as a public [npm package](https
The library is available for the following __React Native (0.64.1+)__ platforms:

- __Android 5.0 (API 21)__ and newer
- __iOS 11.0__ and newer
- __iOS 13.4__ and newer

## How To Install

Expand Down
2 changes: 1 addition & 1 deletion docs/Migration-Instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ This page contains React Native PowerAuth mobile SDK migration instructions.
When updating across multiple versions, you need to perform all migration steps additively.
<!-- end -->

- [Migration from version `2.4.x` to `2.5.x`](Version-2.5.md)
- [Migration from version `2.3.x` to `2.4.x`](Version-2.4.md)
- [Migration from version `2.2.x` to `2.3.x`](Version-2.3.md)


## Read Next

- [Troubleshooting](Troubleshooting.md)
3 changes: 2 additions & 1 deletion docs/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ In order to connect to the [PowerAuth](https://www.wultra.com/product/powerauth-

| Version | React-Native<sup>1</sup> | Native SDK | Server version | Support Status |
|---------|-----------------|--------------|----------------|-------------------|
| `2.4.x` | `0.71+` | `1.7.x` | `0.24+` | Fully supported |
| `2.5.x` | `0.73+` | `1.7.x` | `0.24+` | Fully supported |
| `2.4.x` | `0.71+` | `1.7.x` | `0.24+` | Security bugfixes |
| `2.3.x` | `0.64` - `0.70` | `1.7.x` | `0.24+` | Security bugfixes |
| `2.2.x` | | `1.6.x` | `0.24+` | Not supported |

Expand Down
2 changes: 2 additions & 0 deletions docs/Requesting-Device-Activation-Status.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ if (await powerAuth.hasValidActivation()) {
const currentFailCount = status.failCount;
const maxAllowedFailCount = status.maxFailCount;
const remainingFailCount = status.remainingAttempts;
// Custom object contains any proprietary server specific data
const customObject = status.customObject;
} catch (e) {
console.log("An error occurred, report it to the user");
}
Expand Down
7 changes: 7 additions & 0 deletions docs/Version-2.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Migration from 2.4.x to 2.5.x

This guide contains instructions for migration from React Native PowerAuth mobile SDK version `2.4.x` to version `2.5.x`.

## Support for React Native 0.73+

There are no special migration instructions except that version 2.5.0 requires that your application should support React Native 0.73 and later.
5 changes: 3 additions & 2 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native/scripts/react_native_pods'

platform :ios, '12.4'
platform :ios, '13.4'

project 'PowerAuth'

target 'PowerAuth' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath]
:path => config[:reactNativePath],
:hermes_enabled => false
)
pod 'PowerAuth2', '~> 1.7.8'
# Uncomment to use not-published SDK in project. This is effective only if you manually open 'ios/PowerAuth.xcworkspace'
Expand Down
Loading

0 comments on commit af34a2f

Please sign in to comment.