An error occurred while attempting to reset your password on Parse.com (JS SDK) due to an

I am having trouble resetting my password in my angularjs App. I am utilizing Parse (js SDK) as the backend. Even though I am following the documentation and using Parse.User.requestPasswordReset, I keep encountering error 125 which states invalid email address.

This is the html form I am using :

<input type="email" ng-model="resetData.email" required>
<button ng-click="resetPassword(resetData)">
    Ok
</button>

Here is the controller :

app.controller('userCtrl', function($scope, loginService){
    $scope.resetPassword = function(resetData){
        loginService.resetPassword(resetData,$scope);
    };
});

And here is the factory :

app.factory('loginService', function(){
    return{
        resetPassword:function(resetData,scope){
            console.log(resetData.email);
            Parse.User.requestPasswordReset(resetData.email,{
                success:function(){
                    alert('You'll receive an email to reset your password');
                },
                error:function(error){
                    if (error.code === 205) {
                        scope.msg_erreur='User not found';
                        console.log("error "+error.code+" "+error.message);
                    }
                    else{
                        scope.msg_erreur='Oops ! Something wrong happened';
                        console.log("error "+error.code+" "+error.message);
                    };
                }
            })
        }
    }
});

Some important information to consider :

  • The console.log(resetData.email) shows the correct email address.
  • The email addresses I used actually exist in the User Class (if not, there is an "error 205 user not found")
  • I attempted to hard code an email address directly in the Parse.User.requestPasswordReset instead of using resetData.email
  • I tried multiple valid email addresses.

However, I always encounter error 125 indicating an invalid email address.

If anyone has any insights or suggestions, it would be greatly appreciated.

Thank you!

Answer №1

It appears that the email address is being stored in the username field for user logins. To ensure reset emails are sent successfully, add the email address to the email field as well.

This issue seems to be related to Parse's handling of password resets, as it was not a problem previously. While this workaround may not be ideal, it should suffice until the root cause of the problem is addressed by their team.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Problem with FB.logout, FB.getLoginStatus() is yielding an unrecognized status

I've been struggling to implement the functionality of FB.logout() in my project. Every time I try, I encounter the error message: 'FB.logout() called without an access token.' After researching solutions online, I discovered that I need to ...

My webpage is experiencing issues with function calls not functioning as expected

I have created a select menu that is integrated with the Google Font API. To demonstrate how it works, I have set up a working version on JSBIN which you can view here. However, when I tried to replicate the code in an HTML page, I encountered some issues ...

Instructions for implementing personalized horizontal and vertical scrolling within Angular 9

I am currently working on an angular application where users can upload files, and I display the contents of the file on the user interface. These files may be quite long, so I would need vertical scrolling to navigate through them easily. Additionally, fo ...

Framer Motion does not support animations for exiting elements

Why is it that when I specify the exit property of framer motion to my HTML elements, they fail to animate upon being removed from the DOM? Here's an example of what my code looks like: <motion.div initial={{opacity: 0, y: -500}} animate={ ...

What could be the reason for my AngularJS $http.get call with parameters not retrieving the expected filtered outcomes?

Forgive me if this seems like a silly question. I'm currently using a $http.get() request in my client controller to fetch objects based on a specific id. Any guidance would be greatly appreciated. Thank you in advance! $http .get('api/offer ...

How can I obtain the width of one element and then use it to adjust the size of another element that is

Currently, I am working on a dropdown menu and facing an issue with setting the submenus to match the width of the top-level page. In my HTML structure (specifically for a WordPress theme), it looks something like this: <ul class="menu"> <li ...

ES6 does not allow the use of native setters when extending the HTMLButtonElement

Looking for a way to utilize the native setters and getters for an extended HTMLButtonElement, particularly focusing on the 'disabled' property. You can find more information about the property here: https://developer.mozilla.org/en-US/docs/Web/ ...

The error encountered in Heroku logs is due to a Mongoose error where the uri parameter passed to openURI() must be a string, but is

I've been encountering an issue while trying to deploy my project on Heroku. Despite attempting various methods, one error remains unresolved. Here is the snippet of code that I added: useNewUrlParser: true,useCreateIndex: true, app.use(express.urlen ...

What are the steps for customizing smartedit in Hybris?

What techniques can be used to customize smartedit in Hybris utilizing front-end technologies? ...

PHP MySQL Table with a Date Range Filter

As someone who is new to PHP, I have a question. How can I set up a date range filter? I've looked at tutorials, but they haven't worked for me. I do have some code, but it doesn't include any functions. I want to implement this in a CRUD t ...

Refreshing JSON data in AngularJS: How to update only the changed content in an ivh-tree using REST API

After making a REST API call to fetch JSON data in tree format, I save it in a scope variable called $scope.treeData[]. This data is then displayed in an ivh-tree. To keep the data up to date, I use an interval to update it every 60 seconds. The issue ar ...

ng-bind-html is having trouble parsing the HTML correctly and binding it

Here is the code for my controller: myApp.controller('actionEditController', ['$scope', '$stateParams', '$sce',function ($scope, $stateParams, $sce) { $scope.table="<p>OOPSY</p>"; $sc ...

Is it possible to rearrange the positions of 2 divs using solely CSS?

I have created a unique design. On iPad, I am assigning the class 'handHeld' to the <body>, which will trigger positional changes between optionsWrapper and #container using CSS classes I've defined below on jsfiddle.net. .handHeld d ...

What could be causing my Link to malfunction in my about.js file?

I've encountered an issue where clicking the link in my app doesn't produce any result, and I'm unsure of the cause. Below is the content of my app.js file: import './App.css'; import {BrowserRouter as Router, Routes, Route} from ...

Dealing with the 404 error for a missing resource in ocLazyLoad

I am seeking guidance on how to handle resource loading errors in ocLazyLoading. I have attempted to load some resources within the resolve section of my $stateProvider. One file, ctrl.js, loads successfully. However, another file, iam-not-there.js, fails ...

I'm looking to add CSS transitions, like fade-ins, to a list of items in React in a way that the animations occur one after the other upon rendering. How can this be achieved?

I've scoured the depths of Stack Overflow and combed through countless pages on the internet in search of an answer to my query, but alas, I have not found a solution. So, my apologies if this question is a duplicate. Here's my conundrum: https ...

Automated browsing: identifying the difference between AJAX and iframes

During my automated requests (scheduled at specific times, without user involvement), I have noticed that xmlHttpRequest includes extra http headers. In order for the server not to be able to distinguish these requests as automated (they should appear exa ...

What methods are available to transfer a variable from one component to another in React?

In my React app, I have a form component that interacts with a PostgreSQL database to send data. Here is the script for my form: import bodyParser from 'body-parser'; import React, { Fragment, useState } from 'react'; import RatingStar ...

How to align icon and text perfectly in a Bootstrap 5 Button

I am looking to align icons and text within a modal body: <div class="modal-body"> <div class="d-grid gap-2" id="someButtons"> </div> </div> This code snippet demonstrates how I insert buttons ...

Issue with pagination and filtering in Smart-table.js

Presently, my focus is on developing functionality for Smart-table.js, which requires the following features: Retrieve JSON data from a web service Create a table with pagination and filtering capabilities Implement filters for individual columns or globa ...