Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Update user password on user interface

Hello! We were able to import without any problem. Could you clarify how do you import it - through builder back-end (Import button) or any other way? Do you import Users collection or table?

Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

Update user password on user interface

sorry :-) left that in from pasted example- did not catch the obvious problem

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Update user password on user interface

Sorry for asking the same question again. Given the explanation above, I can consistently update any kind of user information, except the password.

What am I missing ?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Update user password on user interface

Hello! Could you clarify your question? What you did and what exactly doesn't work?

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Update user password on user interface

My app requires users to signup before using the app. This works well. I have also allowed users to create their own profile. All the data for the profile is stored in the "User Data" collections. I have provided users with the ability to update their profile through the app. All of this works really well.

Now I am trying to add the ability to allow users to change their password. I have followed the same process as what I am doing for updating user information, but this does not work. I get a success response on my PUT call, but when the user tries to login with their new password, it does not work. Since there is no way to see the password in the collections because it is a "password" type. I am having a hard time debugging the problem.

What am I missing ?

Thanks for you help in advance.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Update user password on user interface

Hello! To change user's password, create new REST service with next settings:
URL: https://api.appery.io/rest/1/db/users...
Method: put
DataType: json
Settings: the same as login service

Set next request parameters:
user_id = empty
X-Appery-Database-Id = {database_id}
X-Appery-Session-Token = empty
username = empty
password = empty

Mark X-Appery-Database-Id and X-Appery-Session-Token as "header parameter"

Save user_id and session token from login REST to localStorage, and add it to request parameters for "change password rest"

REST service for changing password done.

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Update user password on user interface

Awesome that worked. Thank you Sergiy

Zahhar Kirillov
Posts: 0
Joined: Thu Jul 25, 2013 9:41 am

Update user password on user interface

Hi! There is still some error in importing passwords. I user plain number sequences as a password (ie 123456), but fail to sign in after importing from CSV. When I change password for 123456 in the dabadase backed, the same code works fine. Please advice.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Update user password on user interface

When you import.. can you check if there is a space after (or before) the password?

Zahhar Kirillov
Posts: 0
Joined: Thu Jul 25, 2013 9:41 am

Update user password on user interface

This is how my CSV looks like, Max:

"fullname:string","username:string","expires:string","password:password"
"KIRILLOV, Zahhar","a href="mailto:zahhar@gmail.com" rel="nofollow"zahhar@gmail.com/a","08'14","123456"

Return to “Issues”