[mob][photos] added authentication to view passkeys

This commit is contained in:
Aman Raj Singh Mourya
2024-08-24 01:23:57 +05:30
committed by Neeraj Gupta
parent 09da5ca550
commit b9a2cea390

View File

@@ -132,7 +132,16 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
pressedColor: getEnteColorScheme(context).fillFaint,
trailingIcon: Icons.chevron_right_outlined,
trailingIconIsMuted: true,
onTap: () async => await onPasskeyClick(context),
onTap: () async {
final hasAuthenticated = await LocalAuthenticationService.instance
.requestLocalAuthentication(
context,
"Please authenticate to view your passkey",
);
if (hasAuthenticated) {
await onPasskeyClick(context);
}
},
),
sectionOptionSpacing,
],