# Security and access

An AI app connects to your shop with OAuth. You log in to Subbly in your
own browser and approve the app on a consent screen. The app gets a token
for your shop, never your password, and you can take that token back at any
time.

## The consent screen

When an app connects, Subbly asks **Connect _app_ to _shop_?** It shows:

- the app's name and logo,
- who publishes the app, for apps that publish their details at their own
  address,
- the site or program it sends you back to, such as `claude.ai` or
  `localhost` for an app on your computer.

Check all three, then click **Allow**. Click **Cancel** if anything looks
wrong.

An app that registered itself, instead of publishing its details, carries an
**Unverified app** badge. Many desktop and command-line apps register
themselves. Allow one only if you started the connection yourself a moment
ago.

If Subbly cannot connect the app, it shows **This app cannot be connected**
and says why. [Troubleshooting](/developer-resources/subbly-mcp/troubleshooting#this-app-cannot-be-connected)
lists the reasons.

## What an app can do

A connected app acts for the whole shop. It can use every tool that your
plan opens, whoever connected it. See
[Plans and limits](/developer-resources/subbly-mcp/plans-and-limits).

Some tools change things for good: archive, delete, cancel, void, forgive
and ship. Their tool descriptions tell the agent to ask you first, but the
agent decides. Read what it plans to do before you say yes.

## Manage and disconnect

The Subbly admin lists every connected app under
[Settings › Connected apps](https://www.subbly.co/admin/settings/connected-apps).
Only the shop owner and admins see this page. For each app it shows who
connected it, when, and when it last did something.

Click **Disconnect** to end an app's access at once. You can connect it
again later.

An app also loses access when:

- the person who connected it is no longer the shop owner or an admin,
- the shop no longer has an active Subbly subscription,
- nobody uses it for 30 days,
- someone uses one of its tokens twice, which Subbly treats as theft.

Each person has one connection per app. Connecting the same app again
replaces the old connection.

## Good habits

- **Connect with your own account.** Ask each teammate to connect with
  their own Subbly login. Then **Connected apps** shows who connected what.
- **Start small.** Before a bulk change, ask the agent to do one record and
  show you the result.
- **Hide before you delete.** Ask the agent to unpublish a product instead
  of archiving it. Archiving cannot be undone.
- **One subscription change at a time.** Subbly runs subscription changes
  one at a time per shop. A second change in parallel fails.
- **Clean up.** Disconnect apps you no longer use. The **Activity** column
  shows when each app last did something.
- **Treat the chat like the admin.** Answers can hold customer names,
  emails and addresses. Do not share the conversation outside your team.

## OAuth details for client developers

This section is for developers who build their own MCP client. The MCP
server is an OAuth protected resource. Subbly, at `https://www.subbly.co`,
is the authorization server. A request without a token gets HTTP `401` with
a `WWW-Authenticate` header that points to the protected resource metadata.

| What | Value |
| --- | --- |
| Protected resource metadata | `https://mcp.subbly.dev/.well-known/oauth-protected-resource/mcp` |
| Authorization server metadata | `https://www.subbly.co/.well-known/oauth-authorization-server` |
| Resource | `https://mcp.subbly.dev/mcp` |

- **Flow.** Authorization code with PKCE `S256`. Public clients only, so
  `token_endpoint_auth_method` is `none`.
- **Registration.** Use a Client ID Metadata Document (an `https` URL as the
  `client_id`) or Dynamic Client Registration at `/oauth/register`.
- **Redirect URIs.** `https`, `http` on `localhost`, `127.0.0.1` or `[::1]`,
  or an app scheme such as `cursor://`. No fragments. A loopback redirect
  URI matches on any port, so a native app can use whatever port is free.
- **Resource.** Send `resource=https://mcp.subbly.dev/mcp` (RFC 8707).
  Subbly accepts only tokens bound to this resource. The authorization
  response carries `iss` (RFC 9207).
- **Scopes.** None. The shop's plan decides what a token reaches.
- **Tokens.** Opaque strings, not JWTs. Send the access token as
  `Authorization: Bearer <token>`. A token that Subbly rejects gets HTTP
  `401` with `error="invalid_token"`: refresh it, or start the login again.

| Credential | Lifetime |
| --- | --- |
| Authorization code | 60 seconds, one use |
| Access token | 1 hour |
| Refresh token | 30 days, one use; each refresh issues a new one |

- **Reuse ends the connection.** A second use of an authorization code or a
  refresh token revokes the whole connection.
- **Revocation.** Revoke a token at `https://www.subbly.co/oauth/revoke`
  (RFC 7009). Revoking any token of a connection ends the connection.
