Skip to main content

How to Let AI Agents Act for Users Without Sharing Credentials

Users approve their own AI agents in Didit Authentication: a scoped session, passkey approval, access tokens of at most 5 minutes, and an act claim that separates the agent from the person. Included on every plan.

How to Let AI Agents Act for Users Without Sharing Credentials

Contents

In this guide

Jump to the part you need.

Agent access fits teams whose users want an AI agent to work inside their account without handing over a password. Didit Authentication lets each person approve the agent themselves, in a scoped session that ends on its own and that the person or your team can revoke. It is included on every plan with no separate price. The one caveat: any agent can ask today, because allowing verified agents only is not available yet.

Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.

Didit agent access at a glance
SettingOptionsDefault
What agents can doRead only (read): see the person's account information. Acts for them (act): change the person's account settings and preferencesNone until you choose
Which agents may askAny agent today, and the approval screen shows whether it is verified. Allowing verified agents only is not available yetAny agent
How long a session lasts1, 7 or 30 days7 days
Ends when idle for30 minutes, 2 hours or 24 hours2 hours
How people approveA passkey, or their usual sign-inA passkey
Only people approve agent requests (agent_humans_only)Each approval needs a fresh assertion from the approving person's own passkeyOff
Access token lifetimeAt most 5 minutes5-minute maximum
PriceIncluded on every plan, no separate priceIncluded

Start free in the Didit sandbox with no sales call. Test an approval with an agent that supports Didit Authentication's approval flow. For developer setup, see how to add Didit to Claude through MCP using OAuth sign-in.

What the person actually approves

Agent access is a grant, not a password share. The person keeps their own credentials, and the agent gets a session of its own with a scope list attached. Five things happen, in this order:

  1. An AI agent asks to act for a person in your application, naming the scopes it needs.
  2. The person signs in on your application's hosted approval screen, or on your own consent screen, and sees the agent's name and logo, whether it is verified, and what it asks for.
  3. The person can narrow the request, with fewer scopes, a shorter session, or only some of their organizations, then approves it, with a fresh passkey when your settings ask for one.
  4. The agent receives a single-use code and exchanges it for its own tokens. Its access tokens last at most 5 minutes, like a person's.
  5. Every request the agent makes to your backend carries a token whose act claim names the agent and the scopes the person approved.

The agent's session ends when its lifetime passes, after your idle timeout, or when the person or your team revokes it.

Two different things carry the name act. The act permission in the settings is the scope that lets an agent change the person's account settings and preferences. The act claim is what your backend reads in the token to know that an agent is calling and what the person allowed. The permission decides what you offer; the claim decides what you enforce.

Prerequisites

  • Authentication turned on for the application. Every Sandbox application has it on from the start, and a Live application turns it on from the Products page of the console. Until it is on, every runtime route for that application returns 404.
  • At least one registered redirect URL, matching the one in the flow, character for character.
  • People who can sign in, with passkeys available if you keep the default approval method.
  • Agent access turned on under Authentication > Agent access, with one scope option chosen. It is off for a new application, and no scope is selected until you choose one.
  • To let people limit a grant to selected organizations, enable Organizations for your application.

Step by step: from scope request to scoped session

Step 1. Turn on Authentication and register the redirect URL

Enable Didit Authentication for your application and register the redirect URL. The sandbox already has Authentication enabled. For a live application, turn it on from Products in the console.

Each application is its own OpenID Connect issuer: https://<slug>.auth.didit.me for a live application and https://<slug>.sandbox.auth.didit.me for a sandbox one, or your own custom domain once it is active. Set DIDIT_AUTH_ISSUER to that issuer without a trailing slash. Live and sandbox are separate issuers with separate keys, so a token from one fails at the other.

Step 2. Choose the rules under Authentication > Agent access

Turn agent access on, then choose Edit settings. Two of the settings deserve attention before you enable anything. No scope is selected by default. Choose which permissions to offer before testing an approval. Only people approve agent requests (agent_humans_only) can be changed only by an Owner or Admin of your Didit organization, who needs a passkey on their own console account first.

That second setting proves that the approving person used their own authenticator with user verification, within five minutes and tied to that request. It does not detect automation in general, so do not describe it as bot detection. Changes apply to new approvals: sessions people already approved keep the scopes and lifetime they agreed to.

Step 3. Let the agent send the person to your approval screen

Agents that support it send people to your approval screen on their own, so you do not build the consent flow. The person signs in on the hosted page in your brand, then sees the agent's name and logo, whether the agent is verified, and the scopes it asked for. If you built your own consent screen, the calls are the agent approval with a passkey calls in the sign-in methods documentation.

Use Didit with MCP, the video walkthrough of connecting an AI assistant to Didit
MCP is how an AI assistant reaches Didit itself. Agent access is how an agent reaches your users' accounts.

Step 4. The person narrows the request, then approves

The approval screen is where the grant gets smaller, never bigger. A person can turn any scope you offer off, shorten the session, or grant the agent only some of their organizations. Then they approve, with a fresh passkey when your settings ask for one. If nobody approves, the agent gets nothing.

Step 5. The agent exchanges its single-use code for its own tokens

After approval, the agent receives a single-use code and exchanges it for its own tokens. The agent's access token lasts at most 5 minutes. The approval is recorded when the person consents, even if the agent never exchanges its code.

Step 6. Tell an agent request from a person request with the act claim

This is the part that stops an agent borrowing the person's authority. First verify the ES256 signature against your issuer's JWKS and check iss, aud, exp and typ. Then use act to distinguish the caller. The same signing key and the same typ, iss and aud values are used for both.

GET ${DIDIT_AUTH_ISSUER}/.well-known/jwks.json
What the act claim tells your backend
actWho is callingWhat to allow
nullThe personWhat the person may do
{"sub", "agent", "scopes"}An AI agent acting for the personOnly what act.scopes grants, on the routes you open to agents. Reject it everywhere else

On routes you open to agents, verify the token, enforce the approved act.scopes, and enforce the grant's organization restrictions on organization-scoped requests. Elsewhere reject agent tokens. sid in an agent's token is the ID of the access the person granted, and GET /session/ always rejects an agent's token, so an agent cannot pass a check written for the person. The verify a token on your server guide has the checks in code.

Step 7. Give people a way to see and revoke their agents

In React, render <ConnectedAgents /> on the account settings page so people can review and revoke their grants. It lists the agents the person approved, each with a Revoke button. The React quickstart shows where the component goes.

Step 8. Watch and revoke in the console

Authentication > Agent access opens with four counters: active agent sessions, sessions people approved in the last 7 days, people with an agent, and revocations this month, split between people and your team. Under them, every active session shows the person with their photo, the agent with its logo and description and whether it is verified, what it can do, its last activity and when it ends, with a Revoke button.

Revoking ends the agent's session at once, and you can email the person that it ended. Your team can also end every agent session of one person: blocking a person, resetting their MFA or revoking their sessions from Users revokes their agent access too.

Test it in the sandbox before you go live

Every Sandbox application has Authentication on from the start, so you can run the whole flow without a live application:

  • An allowed read. Have an agent ask for read, approve it on the hosted screen, and call a route you opened to agents. The token carries act with the approved scope, and the call succeeds.
  • A rejected write. Have the same agent call a route that needs act when the person approved only read. Your backend rejects it, because the approved scope does not cover the call.
  • A rejected organization. If Organizations is on, have the person approve a grant limited to one organization, then call an endpoint for another. Your backend enforces the selection and rejects the call.
  • A revoked grant. Revoke the session under Authentication > Agent access. Confirm that it is no longer listed as active and that security.agent_access_revoked appears on the person's timeline.

Expected output

  • An access token whose act claim names the agent and the approved scopes, and whose sid is the ID of that grant.
  • A security.agent_access_approved event on the person's timeline, recorded when the person consents, even if the agent never exchanges its code. The agent approval audit documents the event.
  • A row in Active agent sessions in the console, with last activity and an end time. When access is revoked, Didit records security.agent_access_revoked on the person's timeline.

Failure cases and recovery

What goes wrong, what you see, what to do
CaseWhat you seeRecovery
No scope option chosen in settingsNo permission is configuredChoose the permissions to offer, then start a new approval
The person turned scopes off on the approval screenThe token's act.scopes is narrower than the agent asked forReject requests outside the approved scope. If the application offers the required scope, the agent can request a new approval for it
The request targets an organization the person left out of the grantYour backend sees a request outside the approved selectionReject it. The person can approve a new grant that includes that organization
An agent's token reaches a route written for peopleYour backend rejects it, or GET /session/ rejects itKeep act not null out of every route you did not open to agents
The grant ended, by revocation, expiry or idle timeoutA backend that relies on JWT verification alone can still accept a previously issued access token until exp, at most 5 minutes after issuanceA new agent session requires a new approval

Inputs and outputs

What you supply and what comes back
ItemDirectionDetail
Requested scopesInThe agent names them; the person can narrow them; you decide which options to offer
Approval settingsInScope option, session lifetime, idle timeout, approval method, agent_humans_only
Single-use codeOutReturned to the agent after approval, exchangeable once
Agent access tokenOutLasts at most 5 minutes, carries the approved scopes in act.scopes, and identifies the grant in sid
actOutnull for the person, or {"sub", "agent", "scopes"} for an agent
security.agent_access_approved, security.agent_access_revokedOutTimeline audit records on the person's timeline

We include agent access on every plan at no separate price. Authentication usage is priced separately.

Active users on Authentication are what the flow bills: the first 50,000 active users each month are free, then $0.02 per active user month at list price, discounted on Growth and Scale like every Didit price. Every published number is on the pricing page.

Biometric Authentication by Didit, a selfie check shown in the product
Biometric Authentication by Didit, a separate identity check at $0.10 per auth on the published price list.

Worked cost example

Suppose 60,000 people are active in Didit Authentication in one month and 20,000 of them approve an agent. The arithmetic uses only published unit prices:

  • Monthly active users: 60,000, minus 50,000 free = 10,000 billable users.
  • 10,000 times $0.02 = $200 in Authentication usage at list price.
  • Agent access adds $0 in separate fees.

That subtotal excludes plan fees, credits and discounts. Growth takes 4% off Didit prices and Scale 10%, which is why the pricing page is the place to read the final number.

Add Didit to Claude · Open Didit in ChatGPT · MCP setup for every client

Sources

Open the free Didit sandbox without a sales call. In your sandbox application, go to Authentication > Agent access to enable agent access and test your first grant. To go further, see how to add Didit to Claude through MCP.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alberto Rosas

Co-founder and CEO

Alberto Rosas

Alberto Rosas

Co-founder and CEO

About Didit

Questions

Frequently asked questions

How do I let an AI agent act for a user without sharing their credentials?

Turn on agent access in Didit Authentication. The agent asks for scopes, the person signs in on your hosted approval screen or your own consent screen, can narrow the request, and approves it. Passkey approval is the default, and your application can also allow the person's usual sign-in. The agent then exchanges a single-use code for its own tokens, so the person's password never leaves their own sign-in.

How do I tell an agent's request from the person's request?

Read the act claim in the access token. When act is null the person is calling; when it is {"sub", "agent", "scopes"} an AI agent is calling for that person, and you allow only what act.scopes grants on routes you opened to agents. First verify the ES256 signature against your issuer's JWKS and check iss, aud, exp and typ, then use act to distinguish the caller: the same signing key and the same typ, iss and aud values are used for both.

How long does an agent's access token last?

At most 5 minutes, the same as a person's access token. Because GET /session/ always rejects an agent's token, your backend decides from the token's claims and the approved grant.

What is the difference between the Read only and Acts for them scopes?

Read only (read) lets an agent see the person's account information. Acts for them (act) lets it change the person's account settings and preferences. No scope is selected by default. The person can remove any offered scope on the approval screen.

How long can an agent session last, and when does it end?

You choose 1, 7 or 30 days, with 7 as the default, and an idle timeout of 30 minutes, 2 hours or 24 hours, with 2 hours as the default. The session ends when its lifetime passes, after the idle timeout, or when the person or your team revokes it.

Who can revoke an agent's access?

The person can revoke an agent from account settings if your app includes the connected-agents list, which is the <ConnectedAgents /> component in React. Your team can revoke from Authentication > Agent access in the console, and blocking a person, resetting their MFA or revoking their sessions from Users ends their agent access too.

Does agent access cost extra?

No. We include agent access on every plan at no separate price. Authentication usage is priced separately: the first 50,000 active users each month are free, then $0.02 per active user month at list price.

Can I allow only verified agents to ask?

Not yet. Any agent can ask today, and the approval screen shows whether the agent is verified so the person can decide. Allowing verified agents only is listed as unavailable in the documentation.

Can I require a passkey for every agent approval?

Yes. How people approve defaults to a passkey. For a stricter rule, turn on Only people approve agent requests, which needs a fresh assertion from the approving person's own passkey, tied to that request and within five minutes. An Owner or Admin of your Didit organization changes that setting and needs a passkey on their own console account first.

Does GET /session/ work with an agent's token?

No. GET /session/ always rejects an agent's token. On routes you open to agents, verify the token and enforce the approved act.scopes; everywhere else reject agent tokens.

Is agent access on by default for a new application?

No. Agent access is off for a new application, and no scope option is selected until you choose Read only or Acts for them. Turn it on under Authentication > Agent access, then choose Edit settings.

Can someone grant an agent only part of their account?

Yes, if your application uses Organizations. The person can grant the agent only some of their organizations on the approval screen, which shows each organization's logo, or its initial when it has no logo. On organization-scoped routes, your backend should check that the requested organization is included in the approved grant.

Compliance built in

Audited, certified and attested.

We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center

  • Regulation encoded into your flows

    Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.

  • Ready for AMLR

    Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.

  • Tested in Spain's Treasury sandbox

    Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • SOC 2 Type 2
  • ISO 27001
  • iBeta Level 1 and Level 2
  • EU regulator attestation
  • FSM youth protection
  • GDPR
  • EBA remote onboarding
  • MiCA compatible
  • FIDO Alliance member
  • AMLREU AML Regulation ready

Integration · Didit MCP

Run Didit from your own AI agent

Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
  • Run investigationsAsk why a session was declined, review cases, search people and companies.
  • Change rulesCreate payment rules, test them on past data and switch them on.
  • Pull reportsAsk for numbers, exports or the audit log.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.