@digitalpersona/authentication
Version:
DigitalPersona Authentication API
29 lines (17 loc) • 1.09 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@digitalpersona/authentication](./authentication.md) > [TimeOtpAuth](./authentication.timeotpauth.md) > [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 | 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.