Skip to content
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

App shows only 4 digits of a 6 digit code #147

Closed
GHPS opened this issue Sep 10, 2021 · 7 comments
Closed

App shows only 4 digits of a 6 digit code #147

GHPS opened this issue Sep 10, 2021 · 7 comments

Comments

@GHPS
Copy link

GHPS commented Sep 10, 2021

Problem: After scanning a 6 digit code only 4 digits are displayed.
The problem is caused by the two token per line grip layout - the
column is not wide enough for a 6 digit code.

Background: I was setting up the 2FA on Github with FreeOTPPlus but
couldn't enter the required 6 digits since the app gave me only 4 digits.
First I tried padding the number with zeros which expectingly didn't work.
Tapping on the Github token showed that the app correctly found a 6 digit token.

Quick fix: As a last resort to display the missing 2 digits I rotated the
device from portrait to landscape orientation. And voila, 6 instead of 4
digits were displayed.

Platform: FreeOTPPlus 2.4 (15), Android 9 on Samsung Note 8 (SM-N950F)
with latest updates installed.

@helloworld1
Copy link
Owner

Thank you for the report. I cannot reproduce the issue on my emulator or on galaxy s20. Could you share a screenshot to illustrate the issue?

@GHPS
Copy link
Author

GHPS commented Sep 12, 2021

Included you'll find the two screenshots. Excuse the quality - since the
security settings of Android 9 prevent screenshotting FreeOTP, these
are real screenshots from a second phone.

While taking the shots I've come across another problem: The app invalidates
the current code when the phone is rotated from portrait to landscape
(or back).

FreeOTP4Digit
FreeOTP6Digit

@helloworld1
Copy link
Owner

Thanks for the detailed report. I know the issue now. Galaxy note 8 has 414dp width but new freeotp is treating 400+ dp as tablet and is displaying two columns. I will fix the issue asap by using 480dp width instead.

@GHPS
Copy link
Author

GHPS commented Sep 12, 2021

Great - thanks for your work.

Another approach would be to split the screen horizontally in two parts:

  • A top message area which shows the 6 digits, clock and the provider.
  • A lower part with icons in rows of two to select from.

Other apps use this layout and it is quite elegant.

@helloworld1
Copy link
Owner

The issue is fixed with
59c124f

@helloworld1
Copy link
Owner

2.5 was released to fix the issue.

@GHPS
Copy link
Author

GHPS commented Sep 22, 2021

Great - I've just checked and the problem is indeed fixed.

The second issue, however, is still there - the token displayed
gets invalidated when the device is rotated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants