# applyConfiguredOAuth2

**Kind:** Function

**Source:** [`atloria-monorepo/apps/api/src/project/playground-oauth2.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/api/src/project/playground-oauth2.ts#L115)

Merge the owner's OAuth2 declaration into a spec's `components.securitySchemes`.

A scheme the SPEC already declares under the same id wins: an imported or authored spec is a
first-hand statement about the API, and this overlay exists to fill the gap for specs
generated from source, which can never carry one.

## Signature

```ts
function applyConfiguredOAuth2(spec: Record<string, unknown>, settings: Record<string, unknown> | null): Record<string, unknown>
```

## Parameters

| Name | Type |
|---|---|
| `spec` | `Record<string, unknown>` |
| `settings` | `Record<string, unknown> | null` |

**Returns:** `Record<string, unknown>`
