Security and sign-in

One-time code messages that work

A one-time code has one job: get a person into their account in a few seconds. The wording, the timing and the limits around it decide whether it does.

November 9, 2026 · 5 min read · Updated November 9, 2026

FAQ

Quick answers

How long should a one-time code be valid?

Short, usually a few minutes up to ten, and single use. Choose the shortest period your users can manage.

Should the code be in a link?

No. Send the code as text. Links in code messages are harder to trust and may be filtered.

How many digits should a code have?

Six digits is common. Combine it with limits on attempts, because the length alone does not protect against guessing.