rokwire / safer-illinois-app

Source code repository of "Safer Illinois" App - the official COVID-19 app of the University of Illinois.
https://safer.illinois.edu/
Apache License 2.0
33 stars 23 forks source link

[BUG] Some users facing unable to login error again #695

Closed sandeep-ps closed 3 years ago

sandeep-ps commented 3 years ago

Describe the bug This was a bug that was addressed sometime back (#508). Recently, there have been more reports of users running into this issue. According to the support team, about 5 or 6 errors are being reported every week. Once users are in this state, they cannot proceed with the login.

To Reproduce As you know, this is a bug that's difficult to reproduce. This can happen when the user's UUID is deleted from the Non-PII database and is still referred to in their PII record. One thing to check is if the code that deals with user profile deletion has changed recently.

According to the support team, some of these users had not accessed the app for an extended period of time. So, it's possible that their refresh token could have expired. This may be a hint.

Expected behavior Users should not have deleted UUIDs referred to in their PII data record. This should help stop the "unable to log in" error from appearing due to this issue. People may still run into this error, but we would have removed one possibility.

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Additional context We are temporarily fixing these errors through a database cleanup, which is not a good solution. I'm assigning medium priority to this bug as it's not widespread.

mdryankov commented 3 years ago

@sandeep-ps I have analysed deeply all the story since last 2 years and how this issue was evolved along with all consequences. Everything on client side that may produce such inconsistency is strictly covered (even delete profile is happening only on 20x response code of PII deletion). If this issue is still occurring then all backend repos and all logic that touch Pii & NonPii records must be analyzed in addition, because there is no clarity where the root cause is located.

sandeep-ps commented 3 years ago

Hi @mdryankov, Thanks for rechecking this. We will also check this on the backend side. As you said, it's not clear how a user's record will reach such a state with the current approach.

sandeep-ps commented 3 years ago

The most recent issues, according to the support team, look related to the 2-Factor Authentication and not about the Safer Illinois app. I will close this issue.