Skip to content

Instantly share code, notes, and snippets.

@felipebastosweb
Created October 4, 2023 12:25
Show Gist options
  • Save felipebastosweb/29d1b039cd9fba9d14665df9b5b6cce9 to your computer and use it in GitHub Desktop.
Save felipebastosweb/29d1b039cd9fba9d14665df9b5b6cce9 to your computer and use it in GitHub Desktop.
Delphi Open HomeForm after BiometryAuthentication
// not open HomeForm
procedure TMainForm.ListBox1ItemClick(const Sender: TCustomListBox;
const Item: TListBoxItem);
if BiometricAuth1.IsSupported then begin
BiometricAuth1.Authenticate;
end;
end;
procedure TMainForm.BiometricAuth1AuthenticateSuccess(Sender: TObject);
begin
HomeForm.Show;
end;
// Unit.pas Global var BiometrySuccess := False;
// not open HomeForm
procedure TMainForm.ListBox1ItemClick(const Sender: TCustomListBox;
const Item: TListBoxItem);
if BiometricAuth1.IsSupported then begin
// change BiometrySuccess to True
BiometricAuth1.Authenticate;
if BiometrySuccess then begin
// Go to HomeForm fail
HomeForm.Show;
end;
end;
end;
procedure TMainForm.BiometricAuth1AuthenticateSuccess(Sender: TObject);
begin
BiometrySuccess := True;
//ShowMessage('Fingerprint verified with success.');
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment