# UserPoolAuthenticationProvider

Defines a User Pool Authentication Provider.

Implements: [IUserPoolAuthenticationProvider](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito_identitypool.IUserPoolAuthenticationProvider.html)

- Source: [`aws-cognito-identitypool/lib/identitypool-user-pool-authentication-provider.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-cognito-identitypool/lib/identitypool-user-pool-authentication-provider.ts#L76)
- Type last changed: v2.186.0 · 27 Mar 2025

## Example

TypeScript:

```ts
declare const identityPool: IdentityPool;
const userPool = new cognito.UserPool(this, 'Pool');
identityPool.addUserPoolAuthentication(new UserPoolAuthenticationProvider({
  userPool,
  disableServerSideTokenCheck: true,
}));
```

Python:

```python
# identity_pool: IdentityPool

user_pool = cognito.UserPool(self, "Pool")
identity_pool.add_user_pool_authentication(UserPoolAuthenticationProvider(
    user_pool=user_pool,
    disable_server_side_token_check=True
))
```

Java:

```java
IdentityPool identityPool;

UserPool userPool = new UserPool(this, "Pool");
identityPool.addUserPoolAuthentication(UserPoolAuthenticationProvider.Builder.create()
        .userPool(userPool)
        .disableServerSideTokenCheck(true)
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
IdentityPool identityPool;

var userPool = new UserPool(this, "Pool");
identityPool.AddUserPoolAuthentication(new UserPoolAuthenticationProvider(new UserPoolAuthenticationProviderProps {
    UserPool = userPool,
    DisableServerSideTokenCheck = true
}));
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var identityPool IdentityPool

userPool := cognito.NewUserPool(this, jsii.String("Pool"))
identityPool.AddUserPoolAuthentication(awscdk.NewUserPoolAuthenticationProvider(&UserPoolAuthenticationProviderProps{
	UserPool: UserPool,
	DisableServerSideTokenCheck: jsii.Boolean(true),
}))
```

## Initializer

TypeScript:

```ts
new UserPoolAuthenticationProvider(props: UserPoolAuthenticationProviderProps)
```

Python:

```python
UserPoolAuthenticationProvider(props: UserPoolAuthenticationProviderProps)
```

Java:

```java
new UserPoolAuthenticationProvider(UserPoolAuthenticationProviderProps props)
```

C# / .NET:

```csharp
new UserPoolAuthenticationProvider(UserPoolAuthenticationProviderProps props)
```

Golang:

```go
NewUserPoolAuthenticationProvider(Props UserPoolAuthenticationProviderProps)
```

## Methods

- `bind(scope: Construct, identityPool: IIdentityPool, _options?: UserPoolAuthenticationProviderBindOptions): UserPoolAuthenticationProviderBindConfig` — The method called when a given User Pool Authentication Provider is added (for the first time) to an Identity Pool.
