I have successfully set up Facebook and Google IDPs in my User Pool, but they remain in a 'disabled' state after running CDK deploy
. I have to manually go into the UI and click on enabled
for them to work as expected. How can I programmatically enable them?
this.userPool = new UserPool(this, props.userPoolId, {
selfSignUpEnabled: true,
autoVerify: { email: true },
signInAliases: { email: true },
});
const googleIdp = new UserPoolIdentityProviderGoogle(
this,
"UserPoolIdentityProviderGoogle",
{
userPool: this.userPool,
// Removed
}
);
this.userPool.identityProviders.push(googleIdp);
const facebookIdp = new UserPoolIdentityProviderFacebook(
this,
"UserPoolIdentityProviderFacebook",
{
userPool: this.userPool,
// Removed
}
);
this.userPool.identityProviders.push(facebookIdp);
const userPoolClient = new UserPoolClient(this, props.userPoolClientId, {
userPool: this.userPool,
generateSecret: false,
supportedIdentityProviders: [
UserPoolClientIdentityProvider.GOOGLE,
UserPoolClientIdentityProvider.FACEBOOK,
],
});
userPoolClient.node.addDependency(googleIdp, facebookIdp)
I thought I was enabling those values with the
UserPoolClientIdentityProvider.GOOGLE
and UserPoolClientIdentityProvider.FACEBOOK
line but I might have missed something?