# RefreshTokenRotationProperty

The configuration of your app client for refresh token rotation.

When enabled, your app client issues new ID, access, and refresh tokens when users renew their sessions with refresh tokens. When disabled, token refresh issues only ID and access tokens.

- Source: Generated at build time
- Type last changed: v2.195.0 · 7 May 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cognito as cognito } from 'aws-cdk-lib';
const refreshTokenRotationProperty: cognito.CfnUserPoolClient.RefreshTokenRotationProperty = {
  feature: 'feature',
  retryGracePeriodSeconds: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cognito as cognito

refresh_token_rotation_property = cognito.CfnUserPoolClient.RefreshTokenRotationProperty(
    feature="feature",
    retry_grace_period_seconds=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cognito.*;

RefreshTokenRotationProperty refreshTokenRotationProperty = RefreshTokenRotationProperty.builder()
        .feature("feature")
        .retryGracePeriodSeconds(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Cognito;

var refreshTokenRotationProperty = new RefreshTokenRotationProperty {
    Feature = "feature",
    RetryGracePeriodSeconds = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

refreshTokenRotationProperty := &RefreshTokenRotationProperty{
	Feature: jsii.String("feature"),
	RetryGracePeriodSeconds: jsii.Number(123),
}
```

## Properties

- `feature`: string — The state of refresh token rotation for the current app client.

- `retryGracePeriodSeconds`: number — When you request a token refresh with `GetTokensFromRefreshToken` , the original refresh token that you're rotating out can remain valid for a period of time of up to 60 seconds.

  This allows for client-side retries. When `RetryGracePeriodSeconds` is `0` , the grace period is disabled and a successful request immediately invalidates the submitted refresh token.
