# Oauth Client Formation Resource

> Registers an OAuth 2.0 client (your app at a provider) in the formation's project. A tool names it by ref in execute.auth.oauth_client_id.

# Oauth Client

> This page is auto-generated from the formations OpenAPI spec.
> Do not edit manually — run `pnpm generate-formations-resource-docs` to regenerate.

Registers an OAuth 2.0 client (your app at a provider) in the formation's project. A `tool` names it by `ref` in `execute.auth.oauth_client_id`.

## Syntax

```yaml
type: oauth_client
properties:
  name: String
  authorize_url: String
  token_url: String
  revocation_url: String
  client_id: String
  client_secret: String
  scopes: String[]
  pkce: Boolean
  token_endpoint_auth_method: String
  redirect_uri: String
  authorize_params: Object
```

## Output

The physical resource ID is the **public ID** of the created resource. Reference it from other resources with a `ref` expression:

```yaml
      some_field:
        ref: MyOauthClient
```

## Properties

**`name`**

Display name

_Required_: Yes
_Type_: String

---

**`authorize_url`**

The provider's authorization endpoint

_Required_: Yes
_Type_: String

---

**`token_url`**

The provider's token endpoint

_Required_: Yes
_Type_: String

---

**`revocation_url`**

The provider's RFC 7009 revocation endpoint

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`client_id`**

Your app's client ID at the provider

_Required_: Yes
_Type_: String

---

**`client_secret`**

A `{{secret:sec_...}}` reference to the client secret, never the value; for a template secret, `{ "sub": "{{secret:${MySecret}}}" }`. Omit for a public client, which relies on PKCE.

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`scopes`**

The scopes requested at authorization

_Required_: Yes
_Type_: Array of String

---

**`pkce`**

Whether the authorization uses PKCE (`S256`); default `true`

_Required_: No
_Type_: Boolean

---

**`token_endpoint_auth_method`**

How the client authenticates at the token endpoint

_Required_: No
_Type_: String
_Allowed values_: `client_secret_basic`, `client_secret_post`

---

**`redirect_uri`**

The callback registered with the provider. Omitted or `null`, the deployment's `OAUTH_DEFAULT_REDIRECT_URI` when set, else the server's own `/api/v1/oauth-connections/callback`.

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`authorize_params`**

Extra query parameters for the authorize URL

_Required_: No
_Type_: Object
_Nullable_: Yes

---
