Skip to content

Commit 2b9c633

Browse files
Added deviceCredentialFallback default value (#1098)
2 parents 014347e + e75adfc commit 2b9c633

3 files changed

Lines changed: 14 additions & 10 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -468,16 +468,16 @@ The options for configuring the display of local authentication prompt, authenti
468468

469469
**Properties:**
470470

471-
| Property | Type | Description | Applicable Platforms |
472-
| -------------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -------------------- |
473-
| `title` | `String` | The title of the authentication prompt. | Android, iOS |
474-
| `subtitle` | `String` (optional) | The subtitle of the authentication prompt. | Android |
475-
| `description` | `String` (optional) | The description of the authentication prompt. | Android |
476-
| `cancelTitle` | `String` (optional) | The cancel button title of the authentication prompt. | Android, iOS |
477-
| `evaluationPolicy` | `LocalAuthenticationStrategy` (optional) | The evaluation policy to use when prompting the user for authentication. Defaults to `deviceOwnerWithBiometrics`. | iOS |
478-
| `fallbackTitle` | `String` (optional) | The fallback button title of the authentication prompt. | iOS |
479-
| `authenticationLevel` | `LocalAuthenticationLevel` (optional) | The authentication level to use when prompting the user for authentication. Defaults to `strong`. | Android |
480-
| `deviceCredentialFallback` | `Boolean` (optional) | Should the user be given the option to authenticate with their device PIN, pattern, or password instead of a biometric. | Android |
471+
| Property | Type | Description | Applicable Platforms |
472+
| -------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
473+
| `title` | `String` | The title of the authentication prompt. | Android, iOS |
474+
| `subtitle` | `String` (optional) | The subtitle of the authentication prompt. | Android |
475+
| `description` | `String` (optional) | The description of the authentication prompt. | Android |
476+
| `cancelTitle` | `String` (optional) | The cancel button title of the authentication prompt. | Android, iOS |
477+
| `evaluationPolicy` | `LocalAuthenticationStrategy` (optional) | The evaluation policy to use when prompting the user for authentication. Defaults to `deviceOwnerWithBiometrics`. | iOS |
478+
| `fallbackTitle` | `String` (optional) | The fallback button title of the authentication prompt. | iOS |
479+
| `authenticationLevel` | `LocalAuthenticationLevel` (optional) | The authentication level to use when prompting the user for authentication. Defaults to `strong`. | Android |
480+
| `deviceCredentialFallback` | `Boolean` (optional) | Should the user be given the option to authenticate with their device PIN, pattern, or password instead of a biometric. Defaults to `false` | Android |
481481

482482
> :warning: You need a real device to test Local Authentication for iOS. Local Authentication is not available in simulators.
483483

src/utils/__tests__/addDefaultLocalAuthOptions.spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ describe('addDefaultLocalAuthenticationOptions', () => {
1010
title: 'Please authenticate',
1111
authenticationLevel: LocalAuthenticationLevel.strong,
1212
evaluationPolicy: LocalAuthenticationStrategy.deviceOwnerWithBiometrics,
13+
deviceCredentialFallback: false,
1314
});
1415
});
1516

@@ -18,6 +19,7 @@ describe('addDefaultLocalAuthenticationOptions', () => {
1819
title: 'Please authenticate',
1920
authenticationLevel: LocalAuthenticationLevel.deviceCredential,
2021
evaluationPolicy: LocalAuthenticationStrategy.deviceOwner,
22+
deviceCredentialFallback: false,
2123
};
2224
const result = addDefaultLocalAuthOptions(localAuthOptions);
2325
expect(result).toEqual(localAuthOptions);
@@ -33,6 +35,7 @@ describe('addDefaultLocalAuthenticationOptions', () => {
3335
title: 'Please authenticate',
3436
authenticationLevel: LocalAuthenticationLevel.deviceCredential,
3537
evaluationPolicy: LocalAuthenticationStrategy.deviceOwnerWithBiometrics,
38+
deviceCredentialFallback: false,
3639
});
3740
});
3841
});

src/utils/addDefaultLocalAuthOptions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import LocalAuthenticationLevel from '../credentials-manager/localAuthentication
55
const defaultLocalAuthOptions = {
66
evaluationPolicy: LocalAuthenticationStrategy.deviceOwnerWithBiometrics,
77
authenticationLevel: LocalAuthenticationLevel.strong,
8+
deviceCredentialFallback: false,
89
};
910

1011
function addDefaultLocalAuthOptions(

0 commit comments

Comments
 (0)