Local authentication #2227
Replies: 2 comments
-
I think this could be a good addition to the tool-kit. |
Beta Was this translation helpful? Give feedback.
-
Maui.Biometric has recently added new commits. The individual authentication APIs do not change much, unlike the usage requirements. The user of the device chooses the login method according to their preferences and so it may not be possible to programmatically set a PIN, gesture or pattern. These will be grouped as device credential options. Biometric authentication may require strong authentication or, conversely, may allow login using the device's regular method as a secondary option (PIN, gesture, pattern or device supported alternative). The use case depends on the level of security required - for example, only a fingerprint can be used, in the sense that there is currently one on the phone, or a key can be generated that secures the fingerprint for possible changes or is even exchanged with a remote server. But... I believe there could be an implementation of specific authentications (for example: BiometricAuthentication, WebAuthentication...). |
Beta Was this translation helpful? Give feedback.
-
I propose to add local authentication mechanisms to the toolkit.
Purpose
A form of "protection" by asking a user for confirmation by requiring them to enter the correct credentials for their current login.
Expectations
New APIs
As a start, here's what I think we need (subject to change per discussion):
PromptAuthentication
method: the main driver of the functionality. By default, shows an OS built-in prompt to the user to authenticate. Can be configured to prefer a type of authentication (password, PIN, touch, face, etc.).AuthenticationOptions
class: an object containing configurable settings that can be passed toPromptAuthentication
.Type
:Default
AppDefault
Account
Fingerprint
Face
PIN
Pattern
Passkey
I have absolutely missed instances of each type per platform, so this table is not exhaustive, but would ideally include as much as possible/feasible.
Justification
: astring
explaining why the user needs to authenticateany other settings that are valuable or make sense
AuthenticationResult
enum: describes what happened with the authentication attemptExisting implementations
Why bother implementing in the community toolkit?
Beta Was this translation helpful? Give feedback.
All reactions