Skip to content

Commit 286fc5a

Browse files
MOB-862 #comment updated documentation
1 parent 46c9d87 commit 286fc5a

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ private onAppReady = async (): Promise<void> => {
9696
```js
9797
onStartRegistrationProcess = async (): Promise<void> => {
9898
try {
99-
const response = await TSAuthenticationSDKModule.register(username, displayName);
99+
const response = await TSAuthenticationSDKModule.registerWebAuthn(username, displayName);
100100
// use the response.result string to complete a successful registration in your backend.
101101
} catch (error) {
102-
console.error(`Error authentication the user: ${error}`);
102+
console.error(`Error during registration process: ${error}`);
103103
}
104104
}
105105
```
@@ -108,10 +108,10 @@ onStartRegistrationProcess = async (): Promise<void> => {
108108
```js
109109
onStartAuthenticationProcess = async (): Promise<void> => {
110110
try {
111-
const response = await TSAuthenticationSDKModule.authenticate(username);
111+
const response = await TSAuthenticationSDKModule.authenticateWebAuthn(username);
112112
// use the response.result string to complete a successful authentication in your backend.
113113
} catch (error) {
114-
console.error(`Error authentication the user: ${error}`);
114+
console.error(`Error authenticating the user: ${error}`);
115115
}
116116
}
117117
```
@@ -120,10 +120,32 @@ onStartAuthenticationProcess = async (): Promise<void> => {
120120
```js
121121
onStartSignTransactionProcess = async (): Promise<void> => {
122122
try {
123-
const response = await TSAuthenticationSDKModule.signTransaction(username);
123+
const response = await TSAuthenticationSDKModule.signWebauthnTransaction(username);
124124
// use the response.result string to complete a signing a transaction in your backend.
125125
} catch (error) {
126-
console.error(`Error authentication the user: ${error}`);
126+
console.error(`Error signing a transaction: ${error}`);
127+
}
128+
}
129+
```
130+
131+
#### Get Device Info
132+
```js
133+
onGetDeviceInfo = async (): Promise<void> => {
134+
try {
135+
const response = await TSAuthenticationSDKModule.getDeviceInfo();
136+
} catch (error) {
137+
console.error(`Error getting device info: ${error}`);
138+
}
139+
}
140+
```
141+
142+
#### Check if the device supports webAuthn
143+
```js
144+
onIsWebAuthenSupported = async (): Promise<void> => {
145+
try {
146+
const isSupported = await TSAuthenticationSDKModule.isWebAuthnSupported();
147+
} catch (error) {
148+
console.error(`Error checking if the device supports webAuthn: ${error}`);
127149
}
128150
}
129151
```

0 commit comments

Comments
 (0)