# createPkcePair

**Kind:** Function

**Source:** [`atloria-monorepo/packages/ui-core/src/components/api-explorer/oauth2.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/ui-core/src/components/api-explorer/oauth2.ts#L350)

A PKCE verifier and its S256 challenge.

Refuses rather than falling back to `plain` when SubtleCrypto is unavailable — which in
practice means an insecure context. `plain` sends the verifier in the authorization request,
so it protects against nothing; a flow that cannot be run safely should not be run.

## Signature

```ts
async function createPkcePair(crypto: CryptoLike): Promise<PkcePair>
```

## Parameters

| Name | Type |
|---|---|
| `crypto` | `CryptoLike` |

**Returns:** `Promise<PkcePair>`
