User Journey
What a person sees on the account page, and how they let an agent act for them.
See my account
A signed-in userIDENTITY-V1-E1-05
Starts when: Opens Account from the user menu.
The personSees their email, the date they joined, how many documents they have processed, and their orders.
The systemThe page reads Identity GET /me, DocFlow's totals and Payment's orders.
Result: Nothing changes.
Change my password
A signed-in userIDENTITY-V1-E1-05
Starts when: Taps Change password on the account page.
The personTaps Change password.
The systemIdentity starts a login and returns the address of Cognito's page.
The personOn Cognito's page (not ours): receives a code by email, enters it and a new password.
The systemCognito changes the password.
The personSigns in with the new password on Cognito's page.
The systemIdentity signs them in, revokes their older sessions and records auth.password_changed.
The personLands on the account page with 'Your password was changed'.
The systemThe page reads password_changed=1.
Result: Only this browser stays signed in.
Delete my account
A signed-in userIDENTITY-V1-E1-05
Starts when: Taps Delete account on the account page.
The personReads what will be deleted (documents, results, keys) and what is kept anonymized (orders, for records).
The systemNothing is sent yet.
The personTypes DELETE; the button becomes active; taps it.
The systemIdentity deletes the Cognito user, then the account, and tells every service.
The personLands on the home page, signed out, with 'Your account was deleted'.
The systemEach service deletes or anonymizes that person's data as the event arrives.
Result: The account is gone and cannot sign in. Signing up again with the same email creates a new, empty account.
Give an agent access
A user who uses an AI agentIDENTITY-V1-E1-10
Starts when: Opens API keys on the account page.
The personTaps New key, names it, picks what it may do and when it expires.
The systemNothing is sent until they confirm.
The personTaps Create; sees the secret once, with Copy and 'You won't see this again'.
The systemIdentity stores only the key's hash and records auth.api_key_created.
The personPastes the key into the agent's settings.
The systemThe agent's calls go through the gateway, which exchanges the key for a 5-minute token.
The personLater sees 'Last used 2 minutes ago' beside the key.
The systemIdentity updates the key's last use at most once a minute.
Result: The agent can do what the scopes allow and nothing else; paying still needs the person.
Revoke a key
A userIDENTITY-V1-E1-10
Starts when: Taps Revoke beside a key.
The personConfirms Revoke.
The systemIdentity revokes the key and records auth.api_key_revoked.
The personThe key leaves the list.
The systemThe agent's next call fails with invalid_api_key within 5 minutes.
Result: The key never works again.
When something goes wrong
- Types something other than DELETE
confirmation_mismatch - The button stays inactive; if sent anyway, 'Type DELETE to confirm.'
- Cognito is down while deleting
dependency_unavailable - 'We couldn't delete your account right now. Nothing was deleted. Try again in a moment.'
- An agent tries to create a key, change the password or delete the account
session_required - The agent is told a person must do this in a browser.
- Already has 10 keys
too_many_keys - 'You have 10 keys. Revoke one to create another.'
- Leaves the name empty or picks no scope
validation_failed - The field is marked with what to fix.
- Closes the dialog before copying the secretNone
- The key is listed, but the secret cannot be shown again: revoke it and create another.
- An agent uses a revoked or expired key
invalid_api_key - The agent is told the key is not valid.
- Opens the account page after the session ended
not_authenticated - Sign-in, then back to the account page.
User journeys on GitHub →