Event when user changes password from restore link

Hi,

First of all: congratulations with backendless! It is a dream to work with compared to the other cloud solutions I used before.

As part of the migration process from our old cloud, I copied all users - minus the passwords. I assigned random passwords to all users, but I want to use the password restoration system to let the users set their own password from the link sent in the restoration email. The email template is setup and setting the password from the link works perfectly. The only thing that could be better is the restoring itself: I had to use a client to do that (Postman in my case). It could be handy if that could be done from the backendless console.

But my issue is that I want to log when users actually set their password using the link. The restore event is invoked when the email is sent, not when the users actually change the password. I tried using a user update event handler, but that is only called when using the PUT API (we allow the users to change their password in the application, after being logged in).

Is a “user set password from restore link” event planned? For me, an alternative would be to edit the change password website code, and post to a log from there. Is that possible?

Kind regards,

Jeroen Dierckx
CTO - Bioracer Motion

Hello Jeroe,

Thank you for kind words, we appreciate your sympathy.
First of all, did you try to import your data directly to Backendless? Recently we added import from JSON feature, please have a go to import the data export from external provider. And of course notify us about results.
Secondly, in regard to restore password event handler, yes, it is sent when user first requests the email. Unfortunately currently we do not plan to support event handler like you derscribed, so if you do have some workarounds please use it.

Regards, Artur.

Hi,

Thanks for the reply. I did not implement the actual migration of the data yet, so I will definitely try the import from json feature as the old metadata is also in json format. The old cloud backend was Enginio (Qt Cloud Services) by the way, if that is useful for you.

I already managed to send a log message from the javascript in the change password web page, but I don’t like adding the secret key to that javascript. Also, I didn’t find a way to get the user ID for the user that changed the password at that point.

That, and the fact that the timeout for a password change from such a link seems to be short, makes me think of another solution. I will probably use random passwords and inform the users of that. We have built in functionality so the users can change their password in the application anyway. The password reset using link functionality doesn’t seem to map my use case well.

Kind regards,
Jeroen

Hi,

I tried importing from json, but I get the error “names can only contain alphanumeric or underscore characters”. Here is a simple sample json that I would like to convert to the new cloud. Note that this is the simplest structure, other tables are more elaborate including links to other tables and binary files.

{
 "createdAt": "2014-02-07T19:26:56.012Z",
 "creator": {
 "id": "52f5337f5a3d8b7b0b019eb5",
 "objectType": "users"
 },
 "email": "pietermertens@gmail.com",
 "firstName": "Pieter",
 "hidden": false,
 "id": "52f5337f5a3d8b7b0b019eb5",
 "isOperator": true,
 "isPatient": true,
 "lastName": "Mertens",
 "objectType": "users",
 "updatedAt": "2016-03-08T18:05:49.969Z",
 "username": "pietermertens@gmail.com"
}

Note: there are too many backend-specific values in the json, so I have to to a smart conversion step somewhere, the data cannot be transfered (links to other data and such). I guess in my case, the easiest thing to do is read the old data, tranform it, and then post it to the backendless using REST (the client API I use).

Edit: I realized the name error was about the filename of the json (is that name used as table name?). I changed the filename to sample_cyclist.json and import started. I get an empty property list though, seen in the attached image.

Hello,

So was the import successful? Or nothing got imported?
If you really need this feature we can offer you our support in importing data from Enginio, please contact sales@backendless.com for more info.

Artur.

Nothing was imported. In the email, the log said something about an invalid date.

Help will not be necessary, I just wanted to inform you of my experiment. As I said, I need to handle a lot of stuff (inter-object relations and such) during the migration, so I will write a proper migration system to do so, not use the json import feature.

Kind regards,
Jeroen

Hi Jeroen,

Тhe import procedure for the individual files supports only the CSV format. The format is documented here:
https://backendless.com/documentation/manage/mgmt_import.htm

The JSON based import is supported only for the files created by Parse (to accommodate Parse to Backendless migration).

Regards,
Mark