-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show time out of sync error #1094
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You genius :) works like charm! Very nice 👍🏼
ListTile( | ||
title: const Text('Trigger self-verification'), | ||
onTap: () => selfVerifyCard(userCodeModel, Configuration.of(context).projectId, client), | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was already implemented in the 'eine andere Karte verifizieren' screen. However, I also see no pain in having it in another place as well :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in the "eine andere Karte verifizieren", it does not trigger the same process. Here, it triggers the self-verification process which also persists the card verification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice solution. Just a small explanation about the outOfSync calculation would be awesome
frontend/lib/identification/verification_workflow/query_server_verification.dart
Show resolved
Hide resolved
Credit goes to @f1sh1918 for discovering that time-offset is the actual issue. :D Let's hope that this actually fixes all of the problems. |
Hm not Sure if this also fixes the case when no activationTimestamp and totpSecret were written in the database but it's a super important fix :) |
True! I'm also not sure what happened there yet. That might actually be a different problem still :/ |
This should resolve #1065, #1056, #1049
When during self-verification, the time of the device is out of sync with the sever, the device would generate a wrong otp code and, thus, the server would respond that the card is not valid. The current app-store version (<= 3.1.3) of the app had the additional problem, that if the server responded once with "invalid", the app would not try to self-verify again the next time the app launches. This was already fixed by #1071 . This means, in the current dev-version (also before this PR), if you landed in this screen, resynced your local time, and restarted the app, the error would go away.
The solution I implemented here, is to simply analyze whether the time of the local device is out of sync at the time of self-verification. If so, we show a simple error like "Die Zeit deines Geräts scheint nicht zu stimmen. Synchronisiere deine Uhrzeit in den Geräte-Einstellungen."