-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws-cognito: UserPool.identityProviders is empty #31252
Comments
@jburn7 Good afternoon. For your scenario, were these identity providers added outside the CDK code? If yes, then CDK doesn't know about it. CDK represents a CloudFormation resource with set of attributes. When you run As a workaround, you may try using customer resource provider that makes AWS Cognito Service API call to retrieve list of identity providers. In the successful custom resource call, you could use that list in your code. In case of failure, we could just ignore and proceed with the default. Thanks, |
According to this: aws-cdk/packages/aws-cdk-lib/aws-cognito/lib/user-pool.ts Lines 831 to 833 in 574d383
With that said, you need to define Check description here for more details: aws-cdk/packages/aws-cdk-lib/aws-cognito/lib/user-pool-client.ts Lines 279 to 286 in 574d383
|
@ashishdhingra @pahud I was able to solve this using a combination of both of your answers, thank you |
@jburn7 Glad the guidance worked for you. |
Comments on closed issues and PRs are hard for our team to see. |
Describe the bug
When a modification is made to the UserPoolClient, its associated identity providers are reset to just the Cognito identity provider. According to (https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPoolClientIdentityProvider.html), that is is supposed to be mitigated by providing
supportedIdentityProviders
to theUserPoolClient
.I'm having trouble fetching the existing identity providers in the user pool to pass into
supportedIdentityProviders
Deploying that results in the user pool client's identity providers being reset to just Cognito, which as far as I can tell would imply that UserPool.identityProviders is always empty, because if I were to specify the name of an identity provider instead of fetching it from the user pool like so:
Then that custom provider is kept on the user pool client after a deployment. So the issue is with fetching the existing ones from the user pool
Therefore, I'd ask two things:
supportedIdentityProviders
from the construct produces the same result, where the identity providers are reset to CognitoRegression Issue
Last Known Working CDK Version
No response
Expected Behavior
UserPool.identityProviders
returns the full list of identity providers as seen in the "Federated identity provider sign-in" box of the "Sign-in Experience" tab of a user pool in the AWS consoleCurrent Behavior
UserPool.identityProviders
returns an empty listReproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.138.0
Framework Version
No response
Node.js Version
20
OS
Alpine Linux
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: