new UserPoolClient(this, 'Client', {
idTokenValidity: Duration.hours(2),
accessTokenValidity: Duration.hours(2),
// CDK BUG! sets to 1 minute which is error
refreshTokenValidity: Duration.hours(12),
is synthesized as:
TokenValidityUnits:
AccessToken: minutes
IdToken: minutes
RefreshToken: minutes
RefreshTokenValidity: 1 // <- WRONG!
IdTokenValidity: 120
AccessTokenValidity: 120
You might want to post this as a bug on the github repository, as that is the best place for it if this is really a bug. Link here: https://github.com/aws/aws-cdk