Backendless Password Validation on New User Creation


#1

Hello everyone! I am currently in the migration phase of our data into Backendless and I have been testing the new user enrollment functions but I am running into an issue. @markpiller I’m hoping you have some insight on this. I spoke to @wade earlier today and he let me know that there isn’t a validation feature natively in Dropsource but that most devs are passing the string back to their respective API and validating based on the errors received. I’m not 100% how to accomplish this. I was hoping that someone has done this already and could share some insight. From what I have done so far with Backendless I am more than impressed with the platforms functionality and feature set.

Thanks all!


#2

Hi @matt, Backendless has a built-in mechanism to enable data validation in the database. Specifically to validate passwords, click the Data icon, select the Users table and switch to the SCHEMA tab. You will see there is a way to assign either a built-in or a custom validator (expressed via regex) for every column, including Password:

Hope this helps!

Cheers,
Mark


#3

@markpiller Thanks for the quick response. I think I might have written my original post a bit confusing. What I meant by validate is by forcing the new user to enter their password twice and having them match each other. Is this something that you have come across or tried to test out?

PS. This is extremely helpful though to create a custom expression password. Thank you for that info.


#4

Got it. That functionality is also built in. There is a (customizable) form where the user can enter their new password (twice). This is what that page looks like out of the box: https://backendlessappcontent.com/DDA6CE4B-5AE3-B4BB-FF61-021A41EA4100/656DB5F1-1181-A1D2-FF87-54D17261A200/files/web/templates/change_password/index.html

See the following page in the docs for a detailed description:
https://backendless.com/docs/android/users_password_recovery.html


#5

@markpiller Fantastic! I can see creating a workflow where the new user would just submit name and email. Then handle the password with the confirmation email using this form. Is this something that can be implemented in the app itself on first signup? So new user form would be as follows: Name field, email field, password field, confirm password field. Or is the best course of action to handle the password differently? Sorry for all of the questions. I’m trying to make the onboarding process as easy as possible. Thanks!


#6

Hi @matt, I apologize I missed your response. With what you described, it sounds like new user registration form, rather than password recovery, which is applicable only to the user which have already registered. When a new user is registered, the API requires password to be present, as a result, the password field in the new user registration form would be required.


#7

@markpiller You are correct. This is for the new user creation. Right now I just have my new users entering their password once. I realize now that I can’t create new user without the password. Found that out after some testing. I think what I’m trying to achieve with have the new user enter their password twice for confirmation is something that might need to be handled within the application and not necessarily the API. Looping in @wade to see what his thoughts are on this. What I’m trying to accomplish here Wade, is a new user puts in their password, then they would enter it again. My assumption here is I would check this within Dropsource using string matching. However, is this even possible? Thanks!


#8

Matt, have you tried using an IF/ELSE action and checking if textfield1.text == textfield2.text