Reset Password Issue

I’m creating a custom interface within my application for users to reset their password if they forget it. After providing their email address, I submit the following post to the DSP:

$http({
method: ‘post’,
url: DSP_URL + ‘/rest/user/password?reset=true’,
data: {
email: email
}
})

I’m getting the following response:

{“error”:[{“context”:null,“message”:“Error processing password reset.\nThere is no valid session for the current request.”,“code”:500}]}

My question is, how is the user supposed to have a valid session if they can’t log in because they forgot their password? I don’t have this issue when using the “user/register?login=true” call without having a valid session.

Thanks,
Troy

I have reproduced this as a bug. I am working on a fix. I will reply to this thread with the fix or a suitable workaround.

Wow, that was a fast response! Thanks for your support, look forward to the fix.

The fix is in our platform library develop branch here.

Depending on your install (if not on our hosted system) here is how you can apply the fix. Wherever you have the source installed, go to the /vendor/dreamfactory/lib-php-common-platform/src/Resources/User/Session.php and surround line 939 with a try…catch block to avoid the exception like so…

    try
    {
        static::_checkCache();
    }
    catch ( \Exception $ex )
    {
        // ignore session exception, return lookups if we find them
    }
1 Like

That did the trick. Thanks so much for the quick support!