Skip to content

Missing Feature - UserPool client configuration (Callback URLs and scopes) #3037

@CSmither

Description

@CSmither

Ability to configure a Cognito User Pool Clients including callback URLs, signout URLs, and allowed scopes.

  • I'm submitting a ...

    • 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior?
    Can create UserPools and UserPool clients, however the configuration of the client is very limited. Can only specify clientName, enabledAuthFlows, and whether to create a secret or not.

  • What is the expected behavior (or behavior of feature suggested)?
    Would also like to be able to configure callback URLs, signout URLs, and allowed scopes so a complete functional UserPool can be created from scratch.

  • What is the motivation / use case for changing the behavior or adding this feature?
    Ability to create an ApiGateway secured by a cognito userpool with specific callback URLs and available scopes.

  • Please tell us about your environment:

    • CDK CLI Version: 0.34.0
    • OS: Windows 10 | Debian Stretch
    • Language: TypeScript
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)
    Currently I am creating the userpool like below, I believe this to be correct but please tell me if this is the wrong way to go about this?

    const userPool = new cognito.UserPool(this, "userPool", {
      autoVerifiedAttributes: [],
      poolName: "userPool",
      signInType: cognito.SignInType.Username,
      usernameAliasAttributes: [
        cognito.UserPoolAttribute.Email,
        cognito.UserPoolAttribute.PhoneNumber
      ]
    });

    const userPoolClient = new cognito.UserPoolClient(
      this,
      "userPoolClient",
      {
        clientName: "Client",
        enabledAuthFlows: [
          cognito.AuthFlow.AdminNoSrp,
          cognito.AuthFlow.CustomFlowOnly
        ],
        userPool: userPool
      }
    );

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-cognitoRelated to Amazon Cognitoeffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions