UNPKG

@digitalpersona/authentication

Version:
29 lines (17 loc) 1.09 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@digitalpersona/authentication](./authentication.md) &gt; [TimeOtpAuth](./authentication.timeotpauth.md) &gt; [getUnlockCode](./authentication.timeotpauth.getunlockcode.md) ## TimeOtpAuth.getUnlockCode() method Creates a code allowing to unlock a hardware TOTP device when it locks after a number of unsuccessful PIN entries. <b>Signature:</b> ```typescript getUnlockCode(userOrSerialNumber: User | string, challenge: string, token?: JSONWebToken): Promise<string>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | userOrSerialNumber | <code>User &#124; string</code> | a username or a locked device serial number. | | challenge | <code>string</code> | a challenge code provided by the locked device user. | | token | <code>JSONWebToken</code> | an optional JSON Web Token of the locked device user. | <b>Returns:</b> `Promise<string>` a promise to return an unlock code that the locked device user must type in.