Upon a user's first successful login they will be prompted to enable facial recognition for future app authentications. If enabled, then enableFacialRecognition is set to true.
Maintain the following three UserDefaults variables:
email (or API key? -- TBD)
enabledFacialRecognition
promptFacialRecognition
Whenever the app is opened (and no user is logged in):
Check the UserDefaults enabledFacialRecognition variable
If true, use facial recognition and ask the server for the user corresponding to the saved UserDefaults email variable
If the user corresponding to the UserDefaults email variable does not have their enabledFacialRecognition set to true (on the server) then the authentication fails. Otherwise, authentication is successful.
Brainstormed implementation....
Add the following attribute to the User model:
Upon a user's first successful login they will be prompted to enable facial recognition for future app authentications. If enabled, then enableFacialRecognition is set to true.
Maintain the following three UserDefaults variables:
Whenever the app is opened (and no user is logged in):
Once logged into the app: