-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Can I validate user input w/o subsequent signup? Only validation #1054
Comments
Hi @wzup , Thanks for reaching out. Can you please clarify what you mean by 'validate' user input? Specifically - do you mean validate that the inputs fall within predefined parameters (for example, correct password length and character restrictions) or do you mean validate that the actual user credentials (username/password combination) are correct? If you are actually trying to verify that the credentials are correct, can you please give a little more detail about your usecase - why would you want to do this without lgging the user in? It would help us answer your question or take action. Thanks so much. |
This variant:
Because there is Policies section where for example you can set up password strength: So we end up having password restrictions in Cognito, but not on client-side. We have to manually create regex that match Cognito's settings to validate a password client-side. Why this duplication? It is redundant. Same applies to email string. Currently I use validate.js. But why if it would be better to use single source of validation - exactly in Cognito? Auth.isPasswordValid('password')
Auth.isEmailValid('email') |
@wzup |
Hi @wzup Just checking in on this issue - are you asking for a UI component that will get the input restrictions form Cognito in advance of the user making a signUp call? |
This also possible. The idea is to have one source of validators. If I set validators in Cognito, let's use it on the client as well. Either by making a request like Currently it is not possible. I have to create validators (regex string) on the client that matches my Cognito's validators. |
I'm marking this as a feature request. |
FYI, we have started an RFC discussion for a proposed Amplify UI Component refactor to increase customizability and flexibility for our components. Please feel free to add any additional comments to the following issue: |
Unfortunately this is not something that we could implement. If you'd like this feature (a service feature), it would require a new endpoint and new validation functionality. I recommend going into your AWS Console, navigating to Cognito, and submitting feedback (bottom left-hand corner). |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Do you want to request a feature or report a bug?
Issue
What is the current behavior?
DOn't know, can't find methods in docs
What is the expected behavior?
Validate user input WITHOUT subsequent sign up action. Please see example below
SO question
https://stackoverflow.com/questions/50922919/can-i-validate-user-input-w-o-subsequent-signup-only-validation-no-signup
The text was updated successfully, but these errors were encountered: