# UserPoolIdentityProviderGoogleProps

Properties to initialize UserPoolGoogleIdentityProvider.

Extends: [UserPoolIdentityProviderProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPoolIdentityProviderProps.html)
Used as props by: [UserPoolIdentityProviderGoogle](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPoolIdentityProviderGoogle.html)

- Source: [`aws-cognito/lib/user-pool-idps/google.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-cognito/lib/user-pool-idps/google.ts#L14)
- Type last changed: v2.60.0 · 12 Jan 2023

## Example

TypeScript:

```ts
const userpool = new cognito.UserPool(this, 'Pool');
const secret = secretsmanager.Secret.fromSecretAttributes(this, "CognitoClientSecret", {
    secretCompleteArn: "arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx"
}).secretValue

const provider = new cognito.UserPoolIdentityProviderGoogle(this, 'Google', {
  clientId: 'amzn-client-id',
  clientSecretValue: secret,
  userPool: userpool,
});
```

Python:

```python
userpool = cognito.UserPool(self, "Pool")
secret = secretsmanager.Secret.from_secret_attributes(self, "CognitoClientSecret",
    secret_complete_arn="arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx"
).secret_value

provider = cognito.UserPoolIdentityProviderGoogle(self, "Google",
    client_id="amzn-client-id",
    client_secret_value=secret,
    user_pool=userpool
)
```

Java:

```java
UserPool userpool = new UserPool(this, "Pool");
SecretValue secret = Secret.fromSecretAttributes(this, "CognitoClientSecret", SecretAttributes.builder()
        .secretCompleteArn("arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx")
        .build()).getSecretValue();

UserPoolIdentityProviderGoogle provider = UserPoolIdentityProviderGoogle.Builder.create(this, "Google")
        .clientId("amzn-client-id")
        .clientSecretValue(secret)
        .userPool(userpool)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
var userpool = new UserPool(this, "Pool");
var secret = Secret.FromSecretAttributes(this, "CognitoClientSecret", new SecretAttributes {
    SecretCompleteArn = "arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx"
}).SecretValue;

var provider = new UserPoolIdentityProviderGoogle(this, "Google", new UserPoolIdentityProviderGoogleProps {
    ClientId = "amzn-client-id",
    ClientSecretValue = secret,
    UserPool = userpool
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
userpool := cognito.NewUserPool(this, jsii.String("Pool"))
secret := secretsmanager.Secret_FromSecretAttributes(this, jsii.String("CognitoClientSecret"), &SecretAttributes{
	SecretCompleteArn: jsii.String("arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx"),
}).SecretValue

provider := cognito.NewUserPoolIdentityProviderGoogle(this, jsii.String("Google"), &UserPoolIdentityProviderGoogleProps{
	ClientId: jsii.String("amzn-client-id"),
	ClientSecretValue: secret,
	UserPool: userpool,
})
```

## Properties

- `attributeMapping`: [AttributeMapping](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.AttributeMapping.html) — Mapping attributes from the identity provider to standard and custom attributes of the user pool.

  **Default:** no attribute mapping

- `clientId`: string (required) — The client id recognized by Google APIs.

- `clientSecret`: string = none — use clientSecretValue instead

- `clientSecretValue`: [SecretValue](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.SecretValue.html) = none — The client secret to be accompanied with clientId for Google APIs to authenticate the client as SecretValue.

- `scopes`: string[] — The list of Google permissions to obtain for getting access to the Google profile.

  **Default:** [ profile ]

- `userPool`: [IUserPool](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.IUserPool.html) (required) — The user pool to which this construct provides identities.
