User Login Sequence Diagram
This login sequence diagram documents both the successful and failed authentication paths. The conditional block keeps password validation, token creation, and user-facing error behavior in one readable flow.
Diagram source
Use this text as a starting point or open it in the editor to make changes.
title: User Login
User -> Frontend: Enter credentials
Frontend -> Backend: POST /login
Backend -> Database: Look up user
Database --> Backend: User and hash
if: password valid
Backend --> Frontend: Session token
Frontend --> User: Go to dashboard
else: invalid
Backend --> Frontend: 401 Unauthorized
Frontend --> User: Show error
end