# IdentityPoolAuthenticationProviders

Struct · Stable

External Authentication Providers for usage in Identity Pool.

- Source: [`aws-cognito-identitypool/lib/identitypool.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-cognito-identitypool/lib/identitypool.ts#L222)
- Type last changed: v2.224.0 · 13 Nov 2025

## Example

TypeScript:

```ts
declare const openIdConnectProvider: iam.OpenIdConnectProvider;
new IdentityPool(this, 'myidentitypool', {
  identityPoolName: 'myidentitypool',
  authenticationProviders: {
    google: {
      clientId: '12345678012.apps.googleusercontent.com',
    },
    openIdConnectProviders: [openIdConnectProvider],
    customProvider: 'my-custom-provider.example.com',
  },
});
```

Python:

```python
from aws_cdk.aws_cognito_identitypool import IdentityPoolAuthenticationProviders, IdentityPoolGoogleLoginProvider
# open_id_connect_provider: iam.OpenIdConnectProvider

IdentityPool(self, "myidentitypool",
    identity_pool_name="myidentitypool",
    authentication_providers=IdentityPoolAuthenticationProviders(
        google=IdentityPoolGoogleLoginProvider(
            client_id="12345678012.apps.googleusercontent.com"
        ),
        open_id_connect_providers=[open_id_connect_provider],
        custom_provider="my-custom-provider.example.com"
    )
)
```

Java:

```java
OpenIdConnectProvider openIdConnectProvider;

IdentityPool.Builder.create(this, "myidentitypool")
        .identityPoolName("myidentitypool")
        .authenticationProviders(IdentityPoolAuthenticationProviders.builder()
                .google(IdentityPoolGoogleLoginProvider.builder()
                        .clientId("12345678012.apps.googleusercontent.com")
                        .build())
                .openIdConnectProviders(List.of(openIdConnectProvider))
                .customProvider("my-custom-provider.example.com")
                .build())
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
OpenIdConnectProvider openIdConnectProvider;

new IdentityPool(this, "myidentitypool", new IdentityPoolProps {
    IdentityPoolName = "myidentitypool",
    AuthenticationProviders = new IdentityPoolAuthenticationProviders {
        Google = new IdentityPoolGoogleLoginProvider {
            ClientId = "12345678012.apps.googleusercontent.com"
        },
        OpenIdConnectProviders = new [] { openIdConnectProvider },
        CustomProvider = "my-custom-provider.example.com"
    }
});
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var openIdConnectProvider OpenIdConnectProvider

awscdk.NewIdentityPool(this, jsii.String("myidentitypool"), &IdentityPoolProps{
	IdentityPoolName: jsii.String("myidentitypool"),
	AuthenticationProviders: &IdentityPoolAuthenticationProviders{
		Google: &IdentityPoolGoogleLoginProvider{
			ClientId: jsii.String("12345678012.apps.googleusercontent.com"),
		},
		OpenIdConnectProviders: []IOIDCProviderRef{
			openIdConnectProvider,
		},
		CustomProvider: jsii.String("my-custom-provider.example.com"),
	},
})
```

## Properties

- `amazon`: [IdentityPoolAmazonLoginProvider](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito_identitypool.IdentityPoolAmazonLoginProvider.html) — The Amazon Authentication Provider associated with this Identity Pool.

  **Default:** No Amazon Authentication Provider used without OpenIdConnect or a User Pool

- `apple`: [IdentityPoolAppleLoginProvider](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito_identitypool.IdentityPoolAppleLoginProvider.html) — The Apple Authentication Provider associated with this Identity Pool.

  **Default:** No Apple Authentication Provider used without OpenIdConnect or a User Pool

- `customProvider`: string — The developer provider name to associate with this Identity Pool.

  **Default:** no custom provider

- `facebook`: [IdentityPoolFacebookLoginProvider](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito_identitypool.IdentityPoolFacebookLoginProvider.html) — The Facebook Authentication Provider associated with this Identity Pool.

  **Default:** No Facebook Authentication Provider used without OpenIdConnect or a User Pool

- `google`: [IdentityPoolGoogleLoginProvider](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito_identitypool.IdentityPoolGoogleLoginProvider.html) — The Google Authentication Provider associated with this Identity Pool.

  **Default:** No Google Authentication Provider used without OpenIdConnect or a User Pool

- `openIdConnectProviders`: [IOIDCProviderRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_iam.IOIDCProviderRef.html)[] — The OpenIdConnect Provider associated with this Identity Pool.

  **Default:** no OpenIdConnectProvider

- `samlProviders`: [ISAMLProviderRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_iam.ISAMLProviderRef.html)[] — The Security Assertion Markup Language provider associated with this Identity Pool.

  **Default:** no SamlProvider

- `twitter`: [IdentityPoolTwitterLoginProvider](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito_identitypool.IdentityPoolTwitterLoginProvider.html) — The Twitter Authentication Provider associated with this Identity Pool.

  **Default:** No Twitter Authentication Provider used without OpenIdConnect or a User Pool

- `userPools`: [IUserPoolAuthenticationProvider](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito_identitypool.IUserPoolAuthenticationProvider.html)[] — The User Pool Authentication Providers associated with this Identity Pool.

  **Default:** no User Pools associated
