This is a migrated thread and some comments may be shown as answers.

how to connect ionic app (forgot password) to telerik backend services

6 Answers 119 Views
JavaScript SDK
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marcel
Top achievements
Rank 1
Marcel asked on 02 Mar 2016, 08:21 PM

Hello,

Ive been trying to figure out the best solution to giving a user the option to request if they forgot their password by providing just a username within an ionic  hybrid app without transitioning from the login-in page to an actually forgot password page.

 

Thank you 

6 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 03 Mar 2016, 01:31 PM
Hello Marcel,

As I understand you would like the user to be able to reset his password by just entering his username in the mobile app. The reset password functionality normally requires administrator privileges but you can automate the process in the following way:
  1. The user enters his username and submits a "reset password" request, for example by clicking a button.
  2. The mobile app calls a cloud function and sends the username.
  3. The cloud function calls the "changepassword" endpoint of Backend Services, as described in more details here. At this point you also need to generate a new password.
  4. Once the password is changed, you could send an email to the user with his new password. This could be done from the same cloud function. More info about sending e-mails is available here.

Hope that helps.


Regards,
Alexander
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
Marcel
Top achievements
Rank 1
answered on 03 Mar 2016, 02:27 PM

Hello alexander

im not trying to get the user to reset their password

I'm trying to get the user to have there password sent to their email if they forgot it 

once they enter their username in the image shown all they have to do is press forgot password and a email will be sent.

0
Marcel
Top achievements
Rank 1
answered on 03 Mar 2016, 02:30 PM
Or if that's not an opinion, how can I have an password send to them once I navigate to the forgot password page?
0
Alexander
Telerik team
answered on 03 Mar 2016, 03:13 PM
Hi Marcel,

Thanks for the clarification. I am afraid sending the current password is not possible because the user passwords are stored in a hashed form and cannot be decrypted. So the reset password approach is the only option in case of forgotten password.

I believe the steps from my previous post is what you need to implement. The handler of the "Forgot password?" button is where you should call the cloud function to reset the password (step 2).
Please get back to us if you need further assistance with the implementation.

Regards,
Alexander
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
Marcel
Top achievements
Rank 1
answered on 03 Mar 2016, 04:06 PM

Alexander is there a way for you to show me an example on how I would go about doing this for an ionic hybrid app? 

0
Martin
Telerik team
answered on 08 Mar 2016, 12:30 PM

Hi Marcel,

There are two ways you could approach the forgotten password case:

  1. You can reset the password and set a new on yourself (as administrator) programmatically as described above by Alexander. This way you will generate a new password and the user will use the newly generated password to enter the app. Subsequently you may allow the user to supply a new password as explained here.
  2. You can send an email to the user to reset his password and the user will create a new one. I think you have already followed this approached based on this post.

Let me know if you need more help on this.

Regards,
Martin
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
Tags
JavaScript SDK
Asked by
Marcel
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Marcel
Top achievements
Rank 1
Martin
Telerik team
Share this question
or