Products · Identity V1

Account management

An account page to view and update your details, delete your account, and create API keys for AI agents.

Version 1 · Identity, second partDesigned, not builtModule 2 of 15

DesignUser JourneySections

User Journey

What a person sees on the account page, and how they let an agent act for them.

See my account

Starts when: Opens Account from the user menu.

  1. 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

Starts when: Taps Change password on the account page.

  1. The personTaps Change password.

    The systemIdentity starts a login and returns the address of Cognito's page.

  2. The personOn Cognito's page (not ours): receives a code by email, enters it and a new password.

    The systemCognito changes the password.

  3. 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.

  4. 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

Starts when: Taps Delete account on the account page.

  1. The personReads what will be deleted (documents, results, keys) and what is kept anonymized (orders, for records).

    The systemNothing is sent yet.

  2. The personTypes DELETE; the button becomes active; taps it.

    The systemIdentity deletes the Cognito user, then the account, and tells every service.

  3. 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

Starts when: Opens API keys on the account page.

  1. The personTaps New key, names it, picks what it may do and when it expires.

    The systemNothing is sent until they confirm.

  2. 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.

  3. 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.

  4. 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

Starts when: Taps Revoke beside a key.

  1. The personConfirms Revoke.

    The systemIdentity revokes the key and records auth.api_key_revoked.

  2. 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 DELETEconfirmation_mismatch
The button stays inactive; if sent anyway, 'Type DELETE to confirm.'
Cognito is down while deletingdependency_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 accountsession_required
The agent is told a person must do this in a browser.
Already has 10 keystoo_many_keys
'You have 10 keys. Revoke one to create another.'
Leaves the name empty or picks no scopevalidation_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 keyinvalid_api_key
The agent is told the key is not valid.
Opens the account page after the session endednot_authenticated
Sign-in, then back to the account page.