# AuthorizationCodeOptions (/docs/auth/api/interfaces/AuthorizationCodeOptions)



[@kysoql/auth](/docs/auth/api) / AuthorizationCodeOptions

Options for exchanging a Salesforce authorization code for tokens.

## Extends [#extends]

* `TokenEndpointOptions`.`OAuthClientAuthentication`

## Properties [#properties]

| Property                                                               | Modifier   | Type                                                               | Description                                                                                                                                         | Inherited from                                    |
| ---------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| <a id="api-property-clientid" /> `clientId`                            | `readonly` | `string`                                                           | Connected App consumer key / OAuth client ID.                                                                                                       | -                                                 |
| <a id="api-property-code" /> `code`                                    | `readonly` | `string`                                                           | Authorization code returned by Salesforce.                                                                                                          | -                                                 |
| <a id="api-property-redirecturi" /> `redirectUri`                      | `readonly` | `string`                                                           | Redirect URI used for the original authorization request.                                                                                           | -                                                 |
| <a id="api-property-codeverifier" /> `codeVerifier?`                   | `readonly` | `string`                                                           | PKCE verifier corresponding to the authorization request challenge.                                                                                 | -                                                 |
| <a id="api-property-authrequesttype" /> `authRequestType?`             | `readonly` | `string`                                                           | Headless Identity code exchanges can require an Auth-Request-Type header, for example "guest". Omit for ordinary web-server exchanges.              | -                                                 |
| <a id="api-property-uvidhint" /> `uvidHint?`                           | `readonly` | `string`                                                           | Headless guest code exchanges require the raw UVID or UVID-bearing token in the Uvid-Hint header. Do not add the authorization-request prefix here. | -                                                 |
| <a id="api-property-loginurl" /> `loginUrl`                            | `readonly` | `string`                                                           | Salesforce login or My Domain base URL for the token endpoint.                                                                                      | `TokenEndpointOptions.loginUrl`                   |
| <a id="api-property-refreshtokenstore" /> `refreshTokenStore?`         | `readonly` | [`RefreshTokenStore`](/docs/auth/api/interfaces/RefreshTokenStore) | Persist a newly issued/rotated refresh token before returning the session.                                                                          | `TokenEndpointOptions.refreshTokenStore`          |
| <a id="api-property-signal" /> `signal?`                               | `readonly` | `AbortSignal`                                                      | Cancels this request.                                                                                                                               | `TokenEndpointOptions.signal`                     |
| <a id="api-property-timeoutms" /> `timeoutMs?`                         | `readonly` | `number`                                                           | Per HTTP request. Default: 30 seconds.                                                                                                              | `TokenEndpointOptions.timeoutMs`                  |
| <a id="api-property-fetch" /> `fetch?`                                 | `readonly` | (`input`, `init?`) => `Promise`\<`Response`>                       | Native fetch by default. Primarily useful for tests and custom runtimes.                                                                            | `TokenEndpointOptions.fetch`                      |
| <a id="api-property-clientsecret" /> `clientSecret?`                   | `readonly` | `string`                                                           | Use only from a confidential client that can keep this secret.                                                                                      | `OAuthClientAuthentication.clientSecret`          |
| <a id="api-property-clientassertion" /> `clientAssertion?`             | `readonly` | `string`                                                           | JWT client assertion accepted by Salesforce instead of clientSecret.                                                                                | `OAuthClientAuthentication.clientAssertion`       |
| <a id="api-property-clientsecrettransport" /> `clientSecretTransport?` | `readonly` | `"body"` \| `"basic"`                                              | Default: body. Salesforce also accepts HTTP Basic for client secrets.                                                                               | `OAuthClientAuthentication.clientSecretTransport` |
