Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
emiMobile
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mac Stephens
emiMobile
Commits
cbd0f858
Commit
cbd0f858
authored
Sep 10, 2026
by
Michael Brachmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
ecc88919
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
36 deletions
+42
-36
View.Login.dfm
webEMIMobile/View.Login.dfm
+12
-0
View.Login.pas
webEMIMobile/View.Login.pas
+30
-36
No files found.
webEMIMobile/View.Login.dfm
View file @
cbd0f858
...
@@ -109,6 +109,18 @@ object FViewLogin: TFViewLogin
...
@@ -109,6 +109,18 @@ object FViewLogin: TFViewLogin
DisplayText = 'BUF - Buffalo Police Department'
DisplayText = 'BUF - Buffalo Police Department'
end>
end>
end
end
object btnPasskeyLogin: TWebButton
Left = 240
Top = 244
Width = 121
Height = 25
Caption = 'Sign In with Passkey'
ElementID = 'view.login.btnpasskeylogin'
HeightPercent = 100.000000000000000000
TabOrder = 5
WidthPercent = 100.000000000000000000
OnClick = btnPasskeyLoginClick
end
object XDataWebClient: TXDataWebClient
object XDataWebClient: TXDataWebClient
Connection = DMConnection.AuthConnection
Connection = DMConnection.AuthConnection
Left = 492
Left = 492
...
...
webEMIMobile/View.Login.pas
View file @
cbd0f858
...
@@ -15,12 +15,14 @@ type
...
@@ -15,12 +15,14 @@ type
edtPassword
:
TWebEdit
;
edtPassword
:
TWebEdit
;
btnShowPassword
:
TWebButton
;
btnShowPassword
:
TWebButton
;
btnLogin
:
TWebButton
;
btnLogin
:
TWebButton
;
btnPasskeyLogin
:
TWebButton
;
pnlMessage
:
TWebPanel
;
pnlMessage
:
TWebPanel
;
lblMessage
:
TWebLabel
;
lblMessage
:
TWebLabel
;
btnCloseNotification
:
TWebButton
;
btnCloseNotification
:
TWebButton
;
XDataWebClient
:
TXDataWebClient
;
XDataWebClient
:
TXDataWebClient
;
lucbAgency
:
TWebLookupComboBox
;
lucbAgency
:
TWebLookupComboBox
;
procedure
btnLoginClick
(
Sender
:
TObject
);
procedure
btnLoginClick
(
Sender
:
TObject
);
procedure
btnPasskeyLoginClick
(
Sender
:
TObject
);
procedure
btnShowPasswordClick
(
Sender
:
TObject
);
procedure
btnShowPasswordClick
(
Sender
:
TObject
);
procedure
btnCloseNotificationClick
(
Sender
:
TObject
);
procedure
btnCloseNotificationClick
(
Sender
:
TObject
);
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
WebFormCreate
(
Sender
:
TObject
);
...
@@ -77,8 +79,6 @@ var
...
@@ -77,8 +79,6 @@ var
credId
:
string
;
credId
:
string
;
procedure
OnDeviceUser
(
AUsername
,
AAgency
:
string
);
procedure
OnDeviceUser
(
AUsername
,
AAgency
:
string
);
var
passkeyHandler
:
TJSRawEventHandler
;
begin
begin
FAutoUsername
:=
AUsername
;
FAutoUsername
:=
AUsername
;
FAutoAgency
:=
AAgency
;
FAutoAgency
:=
AAgency
;
...
@@ -91,16 +91,8 @@ var
...
@@ -91,16 +91,8 @@ var
if
(
autoSection
)
autoSection
.
classList
.
remove
(
'd-none'
);
if
(
autoSection
)
autoSection
.
classList
.
remove
(
'd-none'
);
if
(
manualSection
)
manualSection
.
classList
.
add
(
'd-none'
);
if
(
manualSection
)
manualSection
.
classList
.
add
(
'd-none'
);
if
(
lbl
)
lbl
.
textContent
=
AUsername
;
if
(
lbl
)
lbl
.
textContent
=
AUsername
;
end
;
// Wire passkey button and "use different account" link via JS
// "Use a different account" — pure JS show/hide
asm
var
btn
=
document
.
getElementById
(
'view.login.btnpasskeylogin'
);
if
(
btn
)
{
btn.addEventListener('click', function() {
document.dispatchEvent(new CustomEvent('login-passkey'));
}
);
}
var
lnk
=
document
.
getElementById
(
'view.login.switchmanual'
);
var
lnk
=
document
.
getElementById
(
'view.login.switchmanual'
);
if
(
lnk
)
{
if
(
lnk
)
{
lnk.addEventListener('click', function(e) {
lnk.addEventListener('click', function(e) {
...
@@ -110,31 +102,6 @@ var
...
@@ -110,31 +102,6 @@ var
}
);
}
);
}
}
end
;
end
;
passkeyHandler
:=
procedure
var
onBeginOK
:
TOnBeginSuccess
;
onBeginErr
:
TOnLoginError
;
storedCredId
:
string
;
begin
storedCredId
:=
AuthService
.
GetCredentialId
;
SetBusy
(
True
);
HideNotification
;
onBeginOK
:=
procedure
(
AChallenge
,
AChallengeToken
:
string
)
begin
DoPasskeyAutoLogin
(
storedCredId
,
AChallenge
,
AChallengeToken
);
end
;
onBeginErr
:=
procedure
(
AMsg
:
string
)
begin
SetBusy
(
False
);
ShowNotification
(
'Login Error: '
+
AMsg
);
end
;
AuthService
.
BeginAuthentication
(
storedCredId
,
onBeginOK
,
onBeginErr
);
end
;
document
.
addEventListener
(
'login-passkey'
,
passkeyHandler
);
end
;
end
;
end
;
end
;
...
@@ -203,6 +170,33 @@ begin
...
@@ -203,6 +170,33 @@ begin
AuthService
.
BeginAuthentication
(
credentialId
,
@
OnBeginOK
,
@
OnBeginError
);
AuthService
.
BeginAuthentication
(
credentialId
,
@
OnBeginOK
,
@
OnBeginError
);
end
;
end
;
procedure
TFViewLogin
.
btnPasskeyLoginClick
(
Sender
:
TObject
);
var
credId
:
string
;
procedure
OnBeginOK
(
AChallenge
,
AChallengeToken
:
string
);
begin
DoPasskeyAutoLogin
(
credId
,
AChallenge
,
AChallengeToken
);
end
;
procedure
OnBeginError
(
AMsg
:
string
);
begin
SetBusy
(
False
);
ShowNotification
(
'Login Error: '
+
AMsg
);
end
;
begin
credId
:=
AuthService
.
GetCredentialId
;
if
credId
=
''
then
begin
ShowNotification
(
'Device not registered. Please restart the app.'
);
Exit
;
end
;
SetBusy
(
True
);
HideNotification
;
AuthService
.
BeginAuthentication
(
credId
,
@
OnBeginOK
,
@
OnBeginError
);
end
;
procedure
TFViewLogin
.
DoWebAuthnGet
(
AUser
,
APassword
,
AAgency
,
ACredentialId
,
procedure
TFViewLogin
.
DoWebAuthnGet
(
AUser
,
APassword
,
AAgency
,
ACredentialId
,
AChallenge
,
AChallengeToken
:
string
);
AChallenge
,
AChallengeToken
:
string
);
var
var
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment