diff --git a/auth/lib/l10n/arb/app_en.arb b/auth/lib/l10n/arb/app_en.arb index 5a82718034..66ed6c8632 100644 --- a/auth/lib/l10n/arb/app_en.arb +++ b/auth/lib/l10n/arb/app_en.arb @@ -23,16 +23,16 @@ "all": "All", "notes": "Notes", "notesLengthLimit": "Notes can be at most {count} characters long", - "@notesLengthLimit": { - "description": "Text to indicate the maximum number of characters allowed for notes", - "placeholders": { - "count": { - "description": "The maximum number of characters allowed for notes", - "type": "int", - "example": "100" - } - } - }, + "@notesLengthLimit": { + "description": "Text to indicate the maximum number of characters allowed for notes", + "placeholders": { + "count": { + "description": "The maximum number of characters allowed for notes", + "type": "int", + "example": "100" + } + } + }, "codeAccountHint": "Account (you@domain.com)", "codeTagHint": "Tag", "accountKeyType": "Type of key", @@ -482,5 +482,6 @@ "setNewPin": "Set new PIN", "importFailureDescNew": "Could not parse the selected file.", "appLockNotEnabled": "App lock not enabled", - "appLockNotEnabledDescription": "Please enable app lock from Security > App Lock" + "appLockNotEnabledDescription": "Please enable app lock from Security > App Lock", + "authToViewPasskey": "Please authenticate to view passkey" } \ No newline at end of file diff --git a/auth/lib/ui/settings/security_section_widget.dart b/auth/lib/ui/settings/security_section_widget.dart index 3e0d2e855b..9739053060 100644 --- a/auth/lib/ui/settings/security_section_widget.dart +++ b/auth/lib/ui/settings/security_section_widget.dart @@ -101,7 +101,18 @@ class _SecuritySectionWidgetState extends State { pressedColor: getEnteColorScheme(context).fillFaint, trailingIcon: Icons.chevron_right_outlined, trailingIconIsMuted: true, - onTap: () async => await onPasskeyClick(context), + onTap: () async { + final bool hasAuthenticated = await LocalAuthenticationService + .instance + .requestLocalAuthentication( + context, + context.l10n.authToViewPasskey, + ); + await PlatformUtil.refocusWindows(); + if (hasAuthenticated) { + await onPasskeyClick(context); + } + }, ), sectionOptionSpacing, MenuItemWidget(