alexandregz / twofactor_gauthenticator

This RoundCube plugin adds the 2-step verification(OTP) to the login proccess
MIT License
214 stars 74 forks source link

Feature Request: Label for OTP App #148

Closed agabellini closed 2 years ago

agabellini commented 3 years ago

Hello,

I'm trying this plugin with Google Authenticator. It works fine! Thanks.

The label in the App show "RoundCube2FA + hostname". I'm asking if it is possible to make it configurable (al least the "RoundCube2FA") or use $config['product_name'] or something else

Andrea

alexandregz commented 2 years ago

It's useful, yep, in fact this is the behavior but how you see your infor depends from the software that you use to store accounts:

I think Google Authenticator uses "issuer" param + URL (Roundcube:' +$('#prefs-title').html().split(/ - /)[1]), Authy only uses URL to show your account.

You can see the code:

alex@vosjod:~/Development/twofactor_gauthenticator(master)$ fgrep -rn RoundCube2FA *
2FA_qr_code.js:4:     var url_qr_code_values = 'otpauth://totp/Roundcube:' +$('#prefs-title').html().split(/ - /)[1]+ '?secret=' +$('#2FA_secret').get(0).value +'&issuer=RoundCube2FA%20'+window.location.hostname;
agabellini commented 2 years ago

Thanks for the reply.

Looking at the code then "RoundCube2FA" is a fixed string. Couldn't a configuration variable be used? Something like:

$config ['twofactor_gauthenticator_issuer'] = 'foobar'

Andrew