mirror of
https://github.com/ente-io/ente.git
synced 2025-08-07 15:09:09 +00:00
[auth] Add device auth check for passkey
This commit is contained in:
parent
4383512540
commit
b5ad13ee69
@ -178,6 +178,15 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
|
|||||||
|
|
||||||
Future<void> onPasskeyClick(BuildContext buildContext) async {
|
Future<void> onPasskeyClick(BuildContext buildContext) async {
|
||||||
try {
|
try {
|
||||||
|
final hasAuthenticated =
|
||||||
|
await LocalAuthenticationService.instance.requestLocalAuthentication(
|
||||||
|
context,
|
||||||
|
context.l10n.authenticateGeneric,
|
||||||
|
);
|
||||||
|
await PlatformUtil.refocusWindows();
|
||||||
|
if (!hasAuthenticated) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final isPassKeyResetEnabled =
|
final isPassKeyResetEnabled =
|
||||||
await PasskeyService.instance.isPasskeyRecoveryEnabled();
|
await PasskeyService.instance.isPasskeyRecoveryEnabled();
|
||||||
if (!isPassKeyResetEnabled) {
|
if (!isPassKeyResetEnabled) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user