File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -275,3 +275,41 @@ Transmit Security, https://github.com/TransmitSecurity
275275## License
276276
277277This project is licensed under the MIT license. See the LICENSE file for more info.
278+
279+ ### Register PIN Code
280+ ``` js
281+ onRegisterPINCode = async (username: string, pinCode: string): Promise < void > => {
282+ try {
283+ const result = await TSAuthenticationSDKModule .registerPinCode (username, pinCode);
284+ // use result.contextIdentifier to commit the registration
285+ await TSAuthenticationSDKModule .commitPinRegistration (result .contextIdentifier );
286+ // Optionally, update your local user store or UI here
287+ } catch (error) {
288+ console .error (` Error registering PIN code: ${ error} ` );
289+ }
290+ }
291+ ```
292+
293+ ### Commit PIN Registration
294+ ``` js
295+ commitPinRegistration = async (contextIdentifier: string): Promise < void > => {
296+ try {
297+ await TSAuthenticationSDKModule .commitPinRegistration (contextIdentifier);
298+ // PIN registration is now committed
299+ } catch (error) {
300+ console .error (` Error committing PIN registration: ${ error} ` );
301+ }
302+ }
303+ ```
304+
305+ ### Authenticate with PIN Code
306+ ``` js
307+ authenticatePinCode = async (username: string, pinCode: string): Promise < void > => {
308+ try {
309+ const result = await TSAuthenticationSDKModule .authenticatePinCode (username, pinCode);
310+ // use the result string to complete PIN authentication in your backend.
311+ } catch (error) {
312+ console .error (` Error authenticating with PIN code: ${ error} ` );
313+ }
314+ }
315+ ```
You can’t perform that action at this time.
0 commit comments