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

7 posts, 0 answers
  1. Marcel
    Marcel avatar
    25 posts
    Member since:
    Mar 2015

    Posted 02 Mar Link to this post

    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 

  2. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 03 Mar Link to this post

    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.
     
  3. Marcel
    Marcel avatar
    25 posts
    Member since:
    Mar 2015

    Posted 03 Mar in reply to Alexander Link to this post

    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.

  4. Marcel
    Marcel avatar
    25 posts
    Member since:
    Mar 2015

    Posted 03 Mar Link to this post

    Or if that's not an opinion, how can I have an password send to them once I navigate to the forgot password page?
  5. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 03 Mar Link to this post

    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.
     
  6. Marcel
    Marcel avatar
    25 posts
    Member since:
    Mar 2015

    Posted 03 Mar in reply to Alexander Link to this post

    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? 

  7. Martin
    Admin
    Martin avatar
    67 posts

    Posted 08 Mar Link to this post

    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.
     
Back to Top