Flowchart for login with OTP

This flowchart shows how a user logs in with a one-time password (OTP) sent to their mobile number. It covers the happy path to the dashboard, the retry loop for a wrong OTP, and the account lock after too many failed attempts. It is useful for students learning flowchart logic and for developers planning a passwordless login.

Example: Flowchart for login with OTP: click to open it in the editor and change it.

Steps and decisions in order

  1. Start: the login process begins.
  2. Enter mobile number (input): the user types their phone number.
  3. Send OTP (process): the system sends a one-time code to that number.
  4. Enter OTP (input): the user types the code they received.
  5. OTP valid? (decision): if Yes, go to Create session. If No, go to Attempts left?
  6. Attempts left? (decision): if Yes, loop back to Enter OTP so the user can try again. If No, go to Lock account for 15 min.
  7. Create session (process): the system logs the user in.
  8. Dashboard (end): the user lands on their dashboard.

Shapes used

ShapeMeaningNodes
OvalStart or end pointStart, Dashboard
ParallelogramUser inputEnter mobile number, Enter OTP
RectangleSystem actionSend OTP, Create session, Lock account for 15 min
DiamondYes/No decisionOTP valid?, Attempts left?

How to adapt it for your project

  • Add an end point after Lock account for 15 min. In this diagram it is a dead end, so you might link it to a "Try again later" message.
  • Add a "Resend OTP" option between Enter OTP and Send OTP for codes that never arrive.
  • Add an "OTP expired?" check before OTP valid? if your codes have a time limit.
  • Add a check after Enter mobile number to confirm that the number is registered or correctly formatted.
  • Write the exact retry limit, such as 3 attempts, on the Attempts left? diamond.

Tip: Label every arrow that leaves a diamond with Yes or No, as this diagram does. It makes the retry loop from Attempts left? back to Enter OTP easy to follow.

Frequently asked questions

What are the steps in a login with OTP flowchart?

The user enters a mobile number, the system sends an OTP, and the user enters it. If the OTP is valid, a session is created and the user reaches the dashboard. Otherwise the user can retry until no attempts are left.

What happens if the user enters a wrong OTP too many times?

The **Attempts left?** decision sends the flow to **Lock account for 15 min**, which blocks further tries for that period.

How many decision points are in the OTP login flowchart?

There are two: **OTP valid?**, which checks the code, and **Attempts left?**, which decides between retrying and locking the account.

Make your own flowchart with AI →

More templates

← All templates

Try AI Flowchart free →