onetimepass
onetimepass copied to clipboard
Token length sometimes vary
The default token_length
is 6, but sometime get_totp
returns tokens with lengths of 5. You can see from the last value in the screenshot attached.
The token code is being returned as an integer. If it's shorter than token_length
then it has leading zeros. Pass as_string
as a truthy value to get it as a string with leading zeroes includes.