Page 1 of 1

App registration with password recovery- will this allow users to log in with their email?

Posted: Mon Jul 07, 2014 12:23 am
by Peter Viglietta

Hi,

The tutorial here:

http://devcenter.appery.io/tutorials/...

This asks you to create a Users collection with a username, email, and password. When a user logs into the app, they enter their username (or 'login'). I want the user to be able to enter their email address as their username. Will this validate on username OR login, or does it have to be username

Thanks!


App registration with password recovery- will this allow users to log in with their email?

Posted: Mon Jul 07, 2014 1:01 am
by Illya Stepanov

Hi Peter,

You can use email as username here, make sure that you're using "Users data" collection for this needs.


App registration with password recovery- will this allow users to log in with their email?

Posted: Mon Jul 07, 2014 1:06 am
by Peter Viglietta

Hi Illya, thanks for the response! Do you mean that I can use email instead of username when I build the app, or the user can put their email address in the login field?


App registration with password recovery- will this allow users to log in with their email?

Posted: Mon Jul 07, 2014 1:23 am
by Illya Stepanov

Basically here is the data source from users collection:
Image

  • as 'username' here is a string, you can use anything, just make an appropriate placeholder in the input component UI.

App registration with password recovery- will this allow users to log in with their email?

Posted: Mon Jul 07, 2014 1:39 am
by Peter Viglietta

Ok.. if I just have the user enter an email, can I map that input component it to both the Username and Email columns in the Create User service.. if I do this will all the alerts for incorrect login/password/email still work in the register and recovery screens?


App registration with password recovery- will this allow users to log in with their email?

Posted: Mon Jul 07, 2014 1:44 am
by Illya Stepanov

Yes, you can.


App registration with password recovery- will this allow users to log in with their email?

Posted: Thu Jul 10, 2014 1:50 am
by Peter Viglietta

I tried doing this, I have and when I got to the part in this tutorial, Under the section: Creating REST services to invoke server code scripts

http://devcenter.appery.io/tutorials/...

...where it tells you to do this in order to create the response parameter (the message that confirms that an email has been sent for password recovery) on the REST service that invokes the server code script :

  1. There’s only one response parameter: message. The service response can be automatically created from the Test tab (here's the screenshot):
    http://devcenter.appery.io/wp-content...

    .. i created a user in my database called user, and hit test, but it gives me this message instead:

    Image

    remember, I have the email input mapped to both the username and the email, like this. Would that affect anything?

    Image

    Or is the problem that my Send grid account isn't activated yet, or I have to set something up in SendGrid for it to send the email properly?

    Any help would be much appreciated, thanks


App registration with password recovery- will this allow users to log in with their email?

Posted: Thu Jul 10, 2014 11:10 am
by Kateryna Grynko

Hi Peter,

Please output a value of a variable XHRResponse in servercode console. It seems there is an error when sending request.