Skip to content

Commit

Permalink
Update packages/aws-cdk-lib/aws-cognito/lib/user-pool-idps/oidc.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Kyle Laker <kyle@laker.email>
  • Loading branch information
msambol and laurelmay authored Jan 22, 2024
1 parent fdcc426 commit d88d338
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class UserPoolIdentityProviderOidc extends UserPoolIdentityProviderBase {
throw new Error(`Expected provider name to be between 3 and 32 characters, received ${name} (${name.length} characters)`);
}
// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolidentityprovider.html#cfn-cognito-userpoolidentityprovider-providername
if (!name.match(/[^_\p{Z}][\p{L}\p{M}\p{S}\p{N}\p{P}][^_\p{Z}]+/)) {
if (!name.match(/^[^_\p{Z}][\p{L}\p{M}\p{S}\p{N}\p{P}][^_\p{Z}]+$/u)) {
throw new Error(`Expected provider name must match [^_\p{Z}][\p{L}\p{M}\p{S}\p{N}\p{P}][^_\p{Z}]+, received ${name}`);
}
return name;
Expand Down

0 comments on commit d88d338

Please sign in to comment.