1
Views
1
Comments
[MSAL Plugin] MSAL SignOut function triggers biometric facial detection in order to signout
Question
Forge component by Walter Robins
2
Published on 11 Feb 2021
Application Type
Mobile

Hi Walter,


I have another question. I installed Outsystems Face Unlock forge widget.


This is used as a second level of security before user can access the login screens.


I have also implemented the Sign Out option on another screen 'Settings'.


However, I noticed that in order to sign out. The biometric face unlock will be trigger and only upon successfully detect the face, then it will sign out. Otherwise, it will not be able to sign out and an error is thrown showing 'The operation couldn't be completed. (OSStatus error -128.)


Please assist and advice.


Appreciate. Thank you so much.


Cheers and Regards

Darryl Ng

Rank: #5547

Hi again Darryl,

I think I understand what might be happening. If so, I've run into similar issues in my own apps. What happens is, if you aren't careful about your logic flows, you'll run into an infinite loop issue where it looks like your Face ID plugin is firing during the sign out process, but actually the following is happening:

  1. The user taps Sign Out
  2. Your business logic happens: the MSAL account is cleared and the OutSystems session is killed
  3. The user either stays on the Settings screen, or is possibly redirected somewhere, depending on your logic
  4. In either case, your app notices that your user doesn't have a session, and an exception is thrown
  5. This triggers the initial sign-in logic, and the Face ID plugin is invoked
  6. If the user passes, the app immediately tries to sign them in again

In many cases, these 6 steps can look instantaneous and can even look like it's trying to invoke the Face ID plugin before the user can be signed out. How you mitigate this depends on how your app is set up, but one solution is to create a landing screen with Anonymous access in which to dump the user upon signout, after step 2. This screen can thank the user for using your app and have a link to sign in again.

If this issue turns out to be something different let me know and I would be happy to assist further.


Best,

Walt