Skip to content

Commit b519ab6

Browse files
Merge pull request #6 from TransmitSecurity/feature/MOB-1679
MOB-1679 Update to latest SDKs. Add latest APIs
2 parents 64b659b + 60e14f1 commit b519ab6

31 files changed

+8787
-6691
lines changed

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,68 @@ private randomString = (): string => {
201201
}
202202
```
203203

204+
### Approval with WebAuthn
205+
```js
206+
onApprovalWebAuthn = async (username: string, approvalData: { [key: string]: string }): Promise<void> => {
207+
try {
208+
const result = await TSAuthenticationSDKModule.approvalWebAuthn(username, approvalData, []);
209+
console.log("Approval result: ", result);
210+
} catch (error: any) {
211+
this.setState({ errorMessage: `${error}` });
212+
}
213+
}
214+
```
215+
216+
### Approval with WebAuthn with Authentication Data
217+
```js
218+
onApprovalWebAuthnWithData = async (rawAuthenticationData: TSWebAuthnAuthenticationData): Promise<void> => {
219+
try {
220+
const result = await TSAuthenticationSDKModule.approvalWebAuthnWithData(rawAuthenticationData, []);
221+
console.log("Approval result: ", result);
222+
} catch (error: any) {
223+
this.setState({ errorMessage: `${error}` });
224+
}
225+
}
226+
```
227+
228+
### Approval with WebAuthn with Native Biometrics
229+
230+
```js
231+
onApprovalNativeBiometrics = async (username: string) => {
232+
try {
233+
const result = await TSAuthenticationSDKModule.approvalNativeBiometrics(username, challenge);
234+
console.log("Approval result: ", result);
235+
} catch (error: any) {
236+
this.setState({ errorMessage: `${error}` });
237+
}
238+
}
239+
```
240+
241+
### Register PIN Code
242+
```js
243+
onRegisterPINCode = async (username: string, pinCode: string): Promise<void> => {
244+
try {
245+
const result = await TSAuthenticationSDKModule.registerPinCode(username, pinCode);
246+
// use result.contextIdentifier to commit the registration
247+
await TSAuthenticationSDKModule.commitPinRegistration(result.contextIdentifier);
248+
} catch (error) {
249+
console.error(`Error registering PIN code: ${error}`);
250+
}
251+
}
252+
```
253+
254+
### Authenticate with PIN Code
255+
```js
256+
authenticatePinCode = async (username: string, pinCode: string): Promise<void> => {
257+
try {
258+
const result = await TSAuthenticationSDKModule.authenticatePinCode(username, pinCode);
259+
// use the result string to complete PIN authentication in your backend.
260+
} catch (error) {
261+
console.error(`Error authenticating with PIN code: ${error}`);
262+
}
263+
}
264+
```
265+
204266
### Information about the device
205267

206268
#### Get Device Info

RELEASE_NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 0.1.4 July 2024
1+
## 0.1.5 July 2024
22
### Content
33
#### Enhancements
44
1. Upgraded native SDKs to iOS `1.1.3` and Android `1.0.19`.

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ dependencies {
8383
// For < 0.71, this will be from the local maven repo
8484
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
8585
//noinspection GradleDynamicVersion
86-
implementation("com.ts.sdk:authentication:1.0.19+")
86+
implementation("com.ts.sdk:authentication:1.0.27")
8787
implementation "com.facebook.react:react-native:+"
8888
}
8989

0 commit comments

Comments
 (0)