Second-Party vs Third-Party

How Securely classifies your application — and how that classification changes how a business consents and which OAuth flow you use.

Securely Connect classifies every OAuth client as either second-party or third-party. The classification is set when your client is registered and is encoded in every access token as the party_type claim. It determines two things:

  1. How the business consents to your access.
  2. Which OAuth flow you use.

The difference is small in words but big in shape. Pick which one fits before you write any code.

SECOND_PARTY — keys belong to one business

A second-party integration is built for a specific business. That business is your customer (or your employer). They sign in to their Securely portal, generate a client_id + client_secret, and hand the credentials to you, the developer.

The handoff of those credentials is the consent. The business has already approved the integration by issuing the keys. Every access token you mint from those keys is automatically scoped to that one business — no consent screen is needed because the business itself did the consenting when they generated the keys.

  • One set of keys per business. The keys carry the business identity. You can't use them to access a different business.
  • Canonical flow: client_credentials. Your backend exchanges the keys for a business-scoped access token.
  • No consent screen. The keys are the consent.
  • Typical client type: CONFIDENTIAL (the key/secret lives in your backend).
  • Typical use case: A single-tenant integration — e.g., a business has internal tooling that needs to read transactions and create payment links automatically.
📘

Each new business → new keys

If a different business wants the same integration, they generate their own client_id + client_secret in their portal. You'll then maintain one set of credentials per business — typically in a key vault, keyed by the business identifier.

THIRD_PARTY — one set of keys, many businesses

A third-party integration is the marketplace pattern. You're a developer building an application that many businesses will sign up for. You register one Securely client and maintain a single set of credentials. Each business that wants to use your app authorizes you separately, at runtime, through the consent flow — they log in, see your app's name and logo, and pick which of their businesses to grant you access to.

  • One set of keys total. You don't manage per-business credentials. The user's consent issues a business-scoped access token at runtime.
  • Canonical flow: authorization_code + PKCE + consent.
  • Consent screen required, every business. Your end user picks which business you may access. See business-consent-third-party.
  • client_credentials is not allowed. Third-party clients must always act on behalf of a user who has consented.
  • Typical client type: PUBLIC (SPA, mobile, desktop) — but CONFIDENTIAL is also valid.
  • Typical use case: A multi-tenant product — e.g., an accounting app, a marketplace integration, anything where you onboard many businesses.
📘

Confidential third-party still uses PKCE

Even if your third-party client has a client_secret, you don't skip PKCE. Consent for a third-party app only happens at /oauth/authorize, and that endpoint requires a code_challenge. A confidential third-party client uses the same flow as a public one and additionally sends client_secret on the token exchange.

At-a-glance comparison

SECOND_PARTYTHIRD_PARTY
Who issues the keysThe business, in their Securely portalYou, by registering a single client with Securely
Number of credential sets you manageOne per businessOne total
ConsentImplicit — the keys are consentExplicit — consent screen, per business
Canonical grantclient_credentialsauthorization_code + PKCE
client_credentials allowed✓✗
authorization_code allowed✓ (uncommon)✓ (required)
User present at runtimeNo (server-to-server)Yes (user picks a business)
Typical client typeCONFIDENTIALPUBLIC (or CONFIDENTIAL)

How to know which you are

Ask yourself: "Are these keys tied to one specific business, or will my app be used by many businesses with one set of keys?"

  • One business → second-party. Use the keys they generated for you.
  • Many businesses → third-party. Register one client with Securely and onboard each business through consent.

If your keys were generated by a business inside their Securely portal, you're second-party. If your keys were generated by you against Securely directly, you're third-party.

What this means for your integration

The Choosing Your OAuth Flow guide turns this into a two-question decision tree.


What’s Next

Did this page help you?