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

OTP code length change #183

Open
cardinal83 opened this issue Feb 13, 2024 · 6 comments
Open

OTP code length change #183

cardinal83 opened this issue Feb 13, 2024 · 6 comments

Comments

@cardinal83
Copy link

Good afternoon

MultiOTP server version 5.9.7.1 is installed.

Is it possible to change the length of the OTP code, for example from 6 to 8? I looked through the documentation and couldn't find an answer to this question. The most appropriate parameter by name is token_otp_list_of_length, but changing it did not produce a visible result, and I also did not find its description in the documentation.
Please help me with this question.

@multiOTP
Copy link
Owner

Hello,

You probably want to change the "default_pin_digits" option, as explained here in the readme file : "default-pin-digits: [4-32] set the default amount of PIN digits"

You can change it directly in the multiotp.ini file, or type the following in command line mode:
multiotp -config default-pin-digits=8

Regards,

@cardinal83
Copy link
Author

cardinal83 commented Feb 13, 2024

Hello.

I need to change the MultiOTP settings so that after scanning the QR code in Google Authenticator I do not have 6-digit OTP codes, but, for example, 8-digit ones.
And in the line “number of digits” on the QR code printing page there was not 6, but the number I needed, for example, 8:
image

@multiOTP
Copy link
Owner

Hello,
Sure, but if you have already created the qrcode with the previsous default value, it's a 6 digit code.
Simply change the default-pin-digits to 8 as explained, delete the user, recreate the user, and it should have a new 8 digits TOTP token.
Regards

@cardinal83
Copy link
Author

cardinal83 commented Feb 14, 2024

Here's what I did:

  1. changed the default-pin-digits parameter to 8
  2. restarted nginx
  3. synchronized a new user from AD
  4. The QR code print page will display "number of digits: 6"
  5. after scanning the QR code in Google Authenticator, it starts displaying 6 digits instead of 8

Perhaps Google Authenticator does not support 8-digit codes as written here: google/google-authenticator#326 and here google/google-authenticator-libpam#20?
Microsoft Authenticator also show 6 digits code.

@multiOTP
Copy link
Owner

Hello,
Sorry for the missunderstanding, The default-pin-digits will fix lthe length of the prefix pin.
There is no option yet to define the number of digits displayed for a new user, and the default value is set to 6.
We will put a new option starting with version 5.6.7.2.
Regards,

@multiOTP multiOTP changed the title OTP code lenght change OTP code length change Feb 16, 2024
@cardinal83
Copy link
Author

New version is out. Any news about this enchancement?

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