Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[auth] Add device auth check for passkey

Neeraj Guptab5ad13ee691c
diff --git a/auth/lib/ui/settings/security_section_widget.dart b/auth/lib/ui/settings/security_section_widget.dart
index 38fa19f4a4..3e0d2e855b 100644
--- a/auth/lib/ui/settings/security_section_widget.dart
+++ b/auth/lib/ui/settings/security_section_widget.dart
@@ -178,6 +178,15 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
Future<void> onPasskeyClick(BuildContext buildContext) async {
try {
+ final hasAuthenticated =
+ await LocalAuthenticationService.instance.requestLocalAuthentication(
+ context,
+ context.l10n.authenticateGeneric,
+ );
+ await PlatformUtil.refocusWindows();
+ if (!hasAuthenticated) {
+ return;
+ }
final isPassKeyResetEnabled =
await PasskeyService.instance.isPasskeyRecoveryEnabled();
if (!isPassKeyResetEnabled) {