# How to get password policy for custom login form?

**URL:** <https://community.auth0.com/t/how-to-get-password-policy-for-custom-login-form/75320>\
**Category:** Get Help\
**Tags:** password-policy, signup, custom-login\
**Created:** [December 22, 2021, 10:04am UTC](https://community.auth0.com/t/how-to-get-password-policy-for-custom-login-form/75320 "2021-12-22T10:04:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubham.negi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shubham.negi/32/33837_2.png) [@shubham.negi](https://community.auth0.com/u/shubham.negi)\
**Post date:** [December 22, 2021, 10:04am UTC](https://community.auth0.com/t/how-to-get-password-policy-for-custom-login-form/75320/1 "2021-12-22T10:04:07Z")

</div>

When password does not matches the policy criteria on submit of sign-up form, webAuth.redirect.signupAndLogin API call checks password policy and calls displayError with message. But this validation happens only when we submit the request.  
Is there any API where password policy can be fetched for a particular DB connection, so that we can evaluate the password input without making the signup POST request.

Note: Goal is to utilize single password policy in custom forms.

PS, There was one similar question asked but the provided answer does not help because it checks the validation at server-side which is not efficient. Looking for a solution which can help validation by policy at client-side. Question link below:

> [@Enable Password Policy for Custom HTML Signup Page](https://community.auth0.com/t/enable-password-policy-for-custom-html-signup-page/46063):
>
> Has anyone implemented password policy checking for custom HTML signup page?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 23, 2021, 5:19pm UTC](https://community.auth0.com/t/how-to-get-password-policy-for-custom-login-form/75320/3 "2021-12-23T17:19:09Z")

</div>

Hi @shubham.negi,

Welcome to the Auth0 Community!

You can get password policy information from the [Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Connections/get_connections_by_id). The endpoint I linked will provide information about the exact details of the policy per connection.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 7, 2022, 5:19pm UTC](https://community.auth0.com/t/how-to-get-password-policy-for-custom-login-form/75320/4 "2022-01-07T17:19:51Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
