Skip to navigation

OAuth

Let customers connect their AI apps by signing in with the account they already hold with your business.
View as Markdown

OAuth allows your customers to connect their AI apps to your business using the account they already have with you. A customer adds your MCP address to their AI app and is sent to your own sign in page, exactly as they would be on your website. Once they have signed in, every request their agent makes reaches your API carrying that customer’s own access token, so the identity, permissions and account rules you already maintain apply to agents without change.

Because your identity provider remains the single source of identity, there is no new credential to issue, deliver or revoke. OAuth works alongside customer keys rather than replacing them, so customers you onboard through the API can continue to connect with a key.

What OAuth provides

  1. A familiar sign in
    Customers connect using the sign in page, credentials and security measures they already know, including any multi factor authentication your provider enforces.
  2. One identity across every channel
    The account a customer uses in your app is the same account their agent acts for, so their history, entitlements and preferences carry across.
  3. Your authorisation, unchanged
    Your API validates the customer’s token as it would for any client, and your existing rules decide what the customer may do.

Before you begin

You need an identity provider that supports OAuth 2.0, such as Okta or Auth0, a custom MCP domain that is verified, and access to the Integration and Secrets pages in the Mitu dashboard.

Configuring OAuth

1

Connect your own domain

The address your identity provider returns customers to after they sign in is built from your custom MCP domain, so connect your domain first. Once it is verified, the dashboard shows the redirect URI you need in the next step.

2

Register Mitu with your identity provider

In your identity provider, register Mitu as a new application and enter the redirect URI shown in the dashboard. Your provider then issues a client ID and a client secret for Mitu.

3

Store the client secret

Add the client secret under Secrets. It is encrypted when stored and never displayed again, and you select it by name when you configure OAuth, so the value itself never appears in your settings.

4

Enter your provider's details

Under Integration, choose Your OAuth and complete each setting from the details your provider issued. The settings reference describes every one.

5

Accept the customer's token in your API

Every request made on behalf of a signed in customer carries their access token in the Authorization header, together with the Mitu signature and the customer’s details.

POST /orders
authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
x-mitu-signature: t=1788990420,v1=5257a869e7ec...
x-mitu-request-id: req_5f13b916
x-mitu-customer-id: cus_0t9549fps3xd

Verify the request to confirm it came through Mitu, then validate the token as you would for any other client of your API. Your existing authorisation decides what the customer may do.

6

Test the sign in

Add your MCP address to an AI app that supports MCP and connect to it. You should be taken to your own sign in page, returned to the app once you have signed in, and able to complete a task that reaches your API as that customer.

Settings reference

SettingDescription
Authorize URLYour provider’s authorization endpoint, to which customers are sent to sign in. For example, https://auth.yourcompany.com/authorize.
Token URLYour provider’s token endpoint, at which the sign in is exchanged for an access token. For example, https://auth.yourcompany.com/oauth/token.
Client IDThe client ID your provider issued when you registered Mitu as an application.
Client secretThe client secret your provider issued, stored under Secrets and selected here by name.
Userinfo URLYour provider’s userinfo endpoint, used to identify which of your customers a token belongs to. Without it, a sign in can be confirmed but the customer cannot be identified.
ScopesThe scopes requested at sign in, separated by spaces. Include openid, and include offline_access so your provider issues a refresh token. Without offline_access, customers are asked to sign in again every hour.
AudienceRequired for Auth0 only. The identifier of your API in Auth0, such as https://api.yourcompany.com. Without it, Auth0 issues a token your API will not accept.
Token endpoint authenticationHow the client ID and secret are presented to your token endpoint, either in the Authorization header using Basic authentication or in the request body. Okta expects the header by default, and Auth0 accepts either. A mismatch causes the token endpoint to reject the request without explanation.
Redirect URIShown in the dashboard once your custom MCP domain is verified, and entered in your provider when you register Mitu.

While customers sign in with OAuth, the other options under Requests from Mitu in your integration are disabled, because the Authorization header carries the customer’s own token. The Mitu signature continues to prove that each request came from Mitu.

Security considerations

  1. Validate every token
    Check the token’s signature, issuer, audience and expiry in your API, exactly as you do for tokens from your own applications.
  2. Keep the client secret in Secrets only
    Never place it in code, configuration files or tickets. If it is exposed, issue a new one in your provider and update it under Secrets.
  3. Request only the scopes you need
    Agents act with the access the customer granted at sign in, so limit scopes to what your tools genuinely require.

With OAuth in place, your customers bring their agents to your business without creating anything new. Every action their agents take is carried out under the account they already hold with you, governed by the identity provider and authorisation rules you already trust.