Skip to content

Commit e3f9358

Browse files
authored
Merge pull request Expensify#86009 from Expensify/passkey-pin-flows
Enable passkeys for PIN flows
2 parents cc404f8 + 7dae0e1 commit e3f9358

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/components/MultifactorAuthentication/config/scenarios/ChangePIN.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const ChangePINSuccessScreen = createScreenWithDefaults(
4747
* This scenario is used when a UK/EU cardholder changes the PIN of their physical card.
4848
*/
4949
export default {
50-
allowedAuthenticationMethods: [CONST.MULTIFACTOR_AUTHENTICATION.TYPE.BIOMETRICS],
50+
allowedAuthenticationMethods: [CONST.MULTIFACTOR_AUTHENTICATION.TYPE.BIOMETRICS, CONST.MULTIFACTOR_AUTHENTICATION.TYPE.PASSKEYS],
5151
action: changePINForCard,
5252
successScreen: <ChangePINSuccessScreen />,
5353
defaultClientFailureScreen: <ClientFailureScreen />,

src/components/MultifactorAuthentication/config/scenarios/RevealPIN.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const ServerFailureScreen = createScreenWithDefaults(
5252
* - Authentication failure: Return SHOW_OUTCOME_SCREEN to show failure screen
5353
*/
5454
export default {
55-
allowedAuthenticationMethods: [CONST.MULTIFACTOR_AUTHENTICATION.TYPE.BIOMETRICS],
55+
allowedAuthenticationMethods: [CONST.MULTIFACTOR_AUTHENTICATION.TYPE.BIOMETRICS, CONST.MULTIFACTOR_AUTHENTICATION.TYPE.PASSKEYS],
5656
action: revealPINForCard,
5757
callback: async (isSuccessful, callbackInput, payload) => {
5858
if (isSuccessful && isRevealPINPayload(payload)) {

src/components/MultifactorAuthentication/config/scenarios/SetPINOrderCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const ServerFailureScreen = createScreenWithDefaults(
6565
* - Authentication failure: Return SHOW_OUTCOME_SCREEN to show failure screen
6666
*/
6767
export default {
68-
allowedAuthenticationMethods: [CONST.MULTIFACTOR_AUTHENTICATION.TYPE.BIOMETRICS],
68+
allowedAuthenticationMethods: [CONST.MULTIFACTOR_AUTHENTICATION.TYPE.BIOMETRICS, CONST.MULTIFACTOR_AUTHENTICATION.TYPE.PASSKEYS],
6969
action: setPersonalDetailsAndShipExpensifyCardsWithPIN,
7070

7171
callback: async (isSuccessful, _callbackInput, payload) => {

tests/unit/components/MultifactorAuthentication/config/scenarios/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ describe('MultifactorAuthentication Scenarios Config', () => {
108108
const setPinScenario = config[CONST.MULTIFACTOR_AUTHENTICATION.SCENARIO.SET_PIN_ORDER_CARD];
109109

110110
expect(setPinScenario).toBeDefined();
111-
expect(setPinScenario.allowedAuthenticationMethods).toStrictEqual([CONST.MULTIFACTOR_AUTHENTICATION.TYPE.BIOMETRICS]);
111+
expect(setPinScenario.allowedAuthenticationMethods).toStrictEqual([CONST.MULTIFACTOR_AUTHENTICATION.TYPE.BIOMETRICS, CONST.MULTIFACTOR_AUTHENTICATION.TYPE.PASSKEYS]);
112112
expect(setPinScenario.action).toBeDefined();
113113
expect(setPinScenario.callback).toBeDefined();
114114
expect(typeof setPinScenario.callback).toBe('function');

0 commit comments

Comments
 (0)