0

I am trying to create AWS userpool client using AWS CDK. I am doing this using python code. Below is my code-

oAuthScopes = ["access-db-data"]
    supportedIdentityProviders = ["COGNITO"]
    allowedOAuthFlows = ["Token"]

    cognito_userpool_clients = _cognito.CfnUserPoolClient(stack, id="user-pool-client-id", user_pool_id="****", client_name="client-name", 
            generate_secret=True, allowed_o_auth_scopes=oAuthScopes, supported_identity_providers=supportedIdentityProviders, allowed_o_auth_flows=allowedOAuthFlows, allowed_o_auth_flows_user_pool_client=True)

I have tried different options for allowedOAuthFlows value as "TOKEN", "token", "CODE", "Code", "code". Still it is not working. For above code I am getting below error -

validation error detected: Value '[Token]' at 'allowedOAuthFlows' failed to satisfy constraint: Member must satisfy constraint: [Member must satisfy enum value set: [implicit, client_credentials, code]] (Service: AWSCognitoIdentityProviderService; Status Code: 400; Error Code: InvalidParameterException;

I don't know what's going wrong here. I referred this link for - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-allowedoauthflows

Nitesh
  • 1,477
  • 5
  • 23
  • 34

1 Answers1

0

Solution - I have updated its value to "client_credentials" and it worked.

Nitesh
  • 1,477
  • 5
  • 23
  • 34