Allow custom digit length on OTP

Hi everyone,

I see that some service providers (like Twilio / Sengrid) expect 7 digits instead of six which is the standard, so it would be good that when I configure an OTP, I could specify the length of it.

thanks for this fantastic project <3

See vaultwarden/.env.template at adf67a8ee887d21e104adfa8b6521d7971f5a1f1 · dani-garcia/vaultwarden · GitHub

Thanks for the quick reply BlackDex, I hadn’t seen it :face_with_open_eyes_and_hand_over_mouth:.

This is only for email OTP, I believe the poster is requesting the support for the client Bitwarden TOTP, which should support standard &digits=7 parameter

OP see,

Essentially though this should be provided by the key issuer at the time of TOTP registration. Possibly it would not be included if expecting to be used with their native authenticator app such as Steam. Either way though should be supported the same as the upstream Bitwarden clients, and as long as you specify the correct parameter for the digits you need you should be able to get the correct 7 digit TOTP code generated.

As cksapp say, I’m requesting support for the client Bitwarden TOTP to register sendgrid and twilio TOTP

That’s not something we can help with. That’s all client side and nothing on the server. The server doesn’t even know the TOTP string used.

Vaultwarden is only the server side API implementation of Bitwarden to which the clients connect.