Skip to content

Commit 841c21f

Browse files
dsshimelclaude
andcommitted
add password verification step to JWT simulation
The JWT flow previously jumped straight from POST /login to signing the token, omitting the credential check. Added a "Verify password" step that clarifies the server still needs a database/store lookup to authenticate the user — the "stateless" property only applies to subsequent requests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b5e44b3 commit 841c21f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

attendabot/frontend/src/simulations/flowData.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,15 @@ export const flows: AuthFlow[] = [
627627
payload: `POST /login\n\n{ "username": "alice",\n "password": "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }`,
628628
color: "#6c8cff",
629629
},
630+
{
631+
from: "server",
632+
to: "server",
633+
label: "Verify password",
634+
description:
635+
'Server checks the credentials against a database or other store (e.g. hashed passwords, LDAP, env vars). This step is NOT stateless \u2014 the server needs some source of truth to authenticate the user. The "stateless" property of JWT only applies to subsequent requests, after this initial verification.',
636+
payload: `hash = bcrypt.hash(password, user.salt)\n\nhash === user.password_hash \u2192 \u2705 MATCH\n\n// This is the ONLY database read\n// in the entire JWT flow`,
637+
color: "#a78bfa",
638+
},
630639
{
631640
from: "server",
632641
to: "server",

0 commit comments

Comments
 (0)