# REST Resource: projects.oauthIdpConfigs

- [Resource: OAuthIdpConfig](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/projects.oauthIdpConfigs#OAuthIdpConfig)
  - [JSON representation](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/projects.oauthIdpConfigs#OAuthIdpConfig.SCHEMA_REPRESENTATION)
  - [OAuthResponseType](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/projects.oauthIdpConfigs#OAuthIdpConfig.OAuthResponseType)
    - [JSON representation](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/projects.oauthIdpConfigs#OAuthIdpConfig.OAuthResponseType.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/projects.oauthIdpConfigs#METHODS_SUMMARY)

## Resource: OAuthIdpConfig

Configuration options for authenticating with an OAuth IDP.

| JSON representation |
|---|
| ``` { "name": string, "clientId": string, "issuer": string, "displayName": string, "enabled": boolean, "clientSecret": string, "responseType": { object (`https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/projects.oauthIdpConfigs#OAuthIdpConfig.OAuthResponseType`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. |
| `clientId` | `string` The client id of an OAuth client. |
| `issuer` | `string` For OIDC Idps, the issuer identifier. |
| `displayName` | `string` The config's display name set by developers. |
| `enabled` | `boolean` True if allows the user to sign in with the provider. |
| `clientSecret` | `string` The client secret of the OAuth client, to enable OIDC code flow. |
| `responseType` | ``object (`https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/projects.oauthIdpConfigs#OAuthIdpConfig.OAuthResponseType`)`` The response type to request for in the OAuth authorization flow. You can set either `idToken` or `code` to true, but not both. Setting both types to be simultaneously true (`{code: true, idToken: true}`) is not yet supported. |

### OAuthResponseType

The response type to request for in the OAuth authorization flow. You can set either `idToken` or `code` to true, but not both. Setting both types to be simultaneously true (`{code: true, idToken: true}`) is not yet supported.

See <https://openid.net/specs/openid-connect-core-1_0.html#Authentication> for a mapping of response type to OAuth 2.0 flow.

| JSON representation |
|---|
| ``` { "idToken": boolean, "code": boolean, "token": boolean } ``` |

| Fields ||
|---|---|
| `idToken` | `boolean` If true, ID token is returned from IdP's authorization endpoint. |
| `code` | `boolean` If true, authorization code is returned from IdP's authorization endpoint. |
| `token (deprecated)` | `boolean` > [!WARNING] > This item is deprecated! Do not use. The `token` response type is not supported at the moment. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/projects.oauthIdpConfigs/create` | Create an Oidc Idp configuration for an Identity Toolkit project. |
| ### `https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/projects.oauthIdpConfigs/delete` | Delete an Oidc Idp configuration for an Identity Toolkit project. |
| ### `https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/projects.oauthIdpConfigs/get` | Retrieve an Oidc Idp configuration for an Identity Toolkit project. |
| ### `https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/projects.oauthIdpConfigs/list` | List all Oidc Idp configurations for an Identity Toolkit project. |
| ### `https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/projects.oauthIdpConfigs/patch` | Update an Oidc Idp configuration for an Identity Toolkit project. |