Skip to content

Troubleshooting

Should you enter the zero at the start of a verification code?

A six-digit code beginning with zero still has six digits. See why the first zero matters and how converting a code to a number can lose its original length.

By Authenticator CloudPublished 2 min read
A paper tile marked 0 connected to five dotted tiles, with an arrow holding the complete row together
The short answer

Yes. The first zero is part of the code. Enter the complete code shown by the authenticator, using the length configured for that entry. Do not treat it as an ordinary number or guess missing digits.

In this article
  1. The first zero takes up a position too
  2. Converting the code to a number can lose its format
  3. A published test vector starts with zero as well
  4. Take the complete current code when you need it
  5. What if the complete code is still rejected?

The first zero takes up a position too

Entered textLength
0123456 digits: complete illustrative string
123455 digits: initial zero removed

Suppose an authenticator shows 012345. This illustrative six-digit string has six positions from left to right, including the initial zero. Entering only 12345 leaves one position out.

A verification code is not a quantity to read as an integer. Its configured length is part of its format, so keep the initial zero when one appears.

Converting the code to a number can lose its format

A numeric conversion discards the initial zero. For example, passing the string '012345' to JavaScript's Number() produces the number 12345. Turning that number back into text does not recover the original six-character length.

That describes a numeric conversion, not the behavior of every website field. If pasted text becomes shorter, compare what the field contains with the complete current code in your authenticator before assuming the account setup is wrong.

A published test vector starts with zero as well

Public exampleRepresentation
Complete eight-digit result07081804
After numeric conversion7081804: original length is no longer preserved

Appendix B of RFC 6238 includes the eight-digit result 07081804. It uses the document's public test secret, SHA1, a 30-second step and T0 = 0 at Unix time 1111111109. The first zero belongs to that result.

This is an eight-digit historical test vector, not a current six-digit account code to enter on a real sign-in page. RFC 4226's reference implementation also prepends zeros until the specified length is reached.

Take the complete current code when you need it

In Authenticator Cloud, find the entry for the service and account you are using, then read its complete current code. Keep any initial zeros when copying or entering it, without routing it through a spreadsheet or another tool that converts it to a number.

If the field already contains an older code, check its contents before entering the new one. When digits are missing, return to the authenticator for the full code instead of guessing how many zeros to add. See the browser copy and fill guide for ways to retrieve a code.

  • Use the complete length shown for that entry, not just the last few digits.
  • Match both the service and account rather than choosing by a similar name alone.
  • If the code gets shorter, check whether it was converted to a number along the way.

What if the complete code is still rejected?

An initial zero is one formatting check. If the complete code is rejected, follow the code troubleshooting steps to check the account, timing and completed setup before removing an existing entry.

References

See the official guides above for detailed setup instructions.

Download the app

Apple App StoreiPhone / iPad Open Android APKDirect download · ARM64 only Download