Skip to content
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

Documentation update: add documentation showing how to configure a cognito password policy in Amplify.configure #13856

Closed
2 tasks
jackirvine97 opened this issue Sep 7, 2023 · 4 comments
Labels
documentation Related to documentation feature requests feature-request Request a new feature

Comments

@jackirvine97
Copy link

jackirvine97 commented Sep 7, 2023

On which framework/platform would you like to see this feature implemented?

React, Angular

Which UI component is this feature-request for?

Authenticator

Please describe your feature-request in detail.

A cognito password policy can be added to an Amplify.configure() call as follow:

Amplify.configure({
    aws_cognito_password_protection_settings: {
        passwordPolicyMinLength: 8,
        passwordPolicyCharacters: [
            "REQUIRES_LOWERCASE",
            "REQUIRES_NUMBERS",
            "REQUIRES_SYMBOLS",
            "REQUIRES_UPPERCASE",
        ],
    },
    Auth: {
        region: awsExports.REGION,
        userPoolId: awsExports.USER_POOL_ID,
        userPoolWebClientId: awsExports.USER_POOL_APP_CLIENT_ID,
    },
})

This automatically passes your password policy to a the password input field in the Authenticator component.

The problem - this straightforward pattern is not mentioned in the documentation!

Please describe a solution you'd like.

Please add a reference to this in the documentation!

We love contributors! Is this something you'd be interested in working on?

  • 👋 I may be able to implement this feature request.
  • ⚠️ This feature might incur a breaking change.
@jackirvine97 jackirvine97 added the feature-request Request a new feature label Sep 7, 2023
@github-actions github-actions bot added the pending-triage Issue is pending triage label Sep 7, 2023
@hbuchel hbuchel added documentation Related to documentation feature requests and removed pending-triage Issue is pending triage labels Sep 8, 2023
@jordanvn jordanvn added the pending-maintainer-response Issue is pending a response from the Amplify team. label Sep 19, 2024
@reesscot reesscot transferred this issue from aws-amplify/amplify-ui Sep 26, 2024
@github-actions github-actions bot added the pending-triage Issue is pending triage label Sep 26, 2024
@HuiSF
Copy link
Member

HuiSF commented Sep 27, 2024

Hi @jackirvine97 Amplify JS v6 now accepts password format fields by calling Amplify.configure(), for exmaple:

Amplify.configure(
  {
    Auth: {
      Cognito: {
        userPoolClientId: "YOUR_USER_POOL_CLIENT_ID",
        userPoolId: "YOUR_USER_POOL_ID",
        passwordFormat: {
          minLength: 8,
          requireLowercase: true,
          requireNumbers: true,
          requireUppercase: true,
          requireSpecialCharacters: true,
        },
      },
    },
  },
);

Can you confirm whether this fulfills your request?

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending a response from the Amplify team. label Sep 27, 2024
@HuiSF HuiSF added pending-community-response Issue is pending a response from the author or community. and removed pending-triage Issue is pending triage labels Sep 27, 2024
@jackirvine97
Copy link
Author

Awesome - this ticket is related to the documentation. The docs (when I made this ticket) had no mention of how configure password policy and i thought it should be added given how common a pattern it is. Do the V6 docs now mention it?

@github-actions github-actions bot added pending-maintainer-response Issue is pending a response from the Amplify team. and removed pending-community-response Issue is pending a response from the author or community. labels Oct 9, 2024
@ashika112
Copy link
Member

ashika112 commented Oct 11, 2024

@jackirvine97 we have section our doc now on how to do this with Amplify backend.

Also, how to configre Auth resource without amplify backend here which talks about password policy overrides.

If this satisfies the ask, can we close this issue?

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending a response from the Amplify team. label Oct 11, 2024
@ashika112 ashika112 added the pending-community-response Issue is pending a response from the author or community. label Oct 11, 2024
@cwomack
Copy link
Member

cwomack commented Oct 22, 2024

Closing this issue as we have not heard back from you. If you are still experiencing this, please feel free to reply back and provide any information previously requested and we'd be happy to re-open the issue.

Thank you!

@cwomack cwomack closed this as completed Oct 22, 2024
@github-actions github-actions bot removed the pending-community-response Issue is pending a response from the author or community. label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to documentation feature requests feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests

6 participants