Self-service
What a signed-in user reads and manages for themselves, with no administrator involved, from their own profile to the passkeys and apps on their account.
AvailableDashboard and API
A signed-in user doesn’t need an administrator to see who the realm thinks they are, or to clean up their own account. With their own session they read their profile and their roles, list the passkeys and authenticator apps they hold and remove one they’ve lost, and see and take back the apps and agents they allowed. Each of these works for every user of the realm, staff and customers alike, and needs no set-up.
Before you begin
Section titled “Before you begin”- Privilege: none. Each call is made with the user’s own session and acts on their own account only.
- Where: the API, and the dashboard pages users use themselves (AI Agents, Approvals, Authorized Apps and FIDO Devices).
- The user is signed in to their own realm.
How it works
Section titled “How it works”Every call here is made with the user’s own session, the one they hold after signing in, and acts on their own account only. None of them needs a realm administrator’s rights.
| What the user does | Call |
|---|---|
| Read who they are: profile, roles and session | POST /whoami/v1 |
| List their passkeys, authenticator apps and recovery codes | GET /devices/v1 |
| Remove a passkey or an authenticator app | DELETE /devices/v1/{id} |
| List the apps they allowed, and remove one | GET /me/v1/oauth2/apps, DELETE /me/v1/oauth2/apps/{clientId} |
| List the agents that may act for them, and remove one | GET /me/v1/oauth2/agents, DELETE /me/v1/oauth2/agents/{agent} |
| See and answer what an agent asks them to approve | GET /me/v1/oauth2/approvals, POST /me/v1/oauth2/approvals/{id} |
The apps are covered in Authorized apps; the agents and approvals in Let users remove agents and Backchannel authentication.
Who am I
Section titled “Who am I”whoami answers, in one call, who the session belongs to (id, realm), the user’s own record (user, without
the password, with webAuthnDeviceCount, the number of passkeys they hold), their administrator roles in the
realm, and the session’s facts: authLevel, authType, authInstant and expiresInSecs.
Their own factors
Section titled “Their own factors”devices/v1 lists every factor the user holds, without its secret: each with its id, kind (webauthn for a
passkey, totp for an authenticator app, recovery for recovery codes), name, lastUsedAt, and whether it is
disabled. A passkey adds what it is (aaguid, keyType, algorithm, whether it is backed up); an app adds its
algorithm, digits and period; recovery codes add how many are remaining. Add ?kind=webauthn to list one
kind.
Set it up
Section titled “Set it up”There’s nothing to set up. As a signed-in user, with your own session in $CVYUH_SESSION (see
Call the API):
curl -X POST https://foobar.cvyuh.com/api/v0/am/whoami/v1 \ -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"List your passkeys:
curl "https://foobar.cvyuh.com/api/v0/am/devices/v1?kind=webauthn" \ -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"{ "data": [ { "id": "<device id>", "kind": "webauthn", "name": "<name>", "lastUsedAt": "<RFC 3339 time>", "disabled": false, "backupEligible": true, "backupState": true, "keyType": "<key type>", "algorithm": "<algorithm>" }] }Remove one you’ve lost:
curl -X DELETE https://foobar.cvyuh.com/api/v0/am/devices/v1/<device id> \ -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"The realm answers 204.
What the user sees
Section titled “What the user sees”- A removed passkey or authenticator app stops working at once; the next sign-in asks for another factor.
- Apps that follow the user’s credential changes are told of each removal (see below).
When a call fails
Section titled “When a call fails”| Answer | What it means | What to do |
|---|---|---|
401 | The session has ended | Sign in again |
404 | No such factor on this account, or the call was made in a realm other than the user’s own | Check the id from the list; call the user’s own realm |
400 | A DELETE on recovery codes, which aren’t removed one at a time | Keep them; they’re the way back in |
Audit record
Section titled “Audit record”Each removal is recorded as DELETED on the factor, with the user as the one who made it, and as a credential change
sent to anyone following the user’s credential changes through
Send signals.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
| A user has lost or removed every factor and can’t sign in | Recovery codes are the way back in; without them, no administrator call clears a user’s factors today | The user signs in with a recovery code and adds a new factor. If they have none left, see the known limitation below |
whoami answers user: null | The call was made in a realm below the user’s own | Call the user’s own realm for their record |
When a user has no way back in. An administrator can’t yet remove another user’s factors or issue new recovery codes, and users can’t rename factors or make new recovery codes themselves. Ask users to keep their recovery codes, and to hold more than one factor. See Known limitations.
Good to know
Section titled “Good to know”- Only in the user’s own realm. Listing or removing factors in any other realm answers
404. - Recovery codes aren’t removed one at a time. They are the way back in when every other factor is gone; a
DELETEon them answers400. whoamireads the user’s record only in their own realm. Asked in a realm below theirs,userisnull, whilerolessays what they may administer there.
Related
Section titled “Related”- Sign-in methods: the factors a user holds.
- Authorized apps: the apps a user allowed.
- Add and change users: what an administrator changes for them.