When accessing the chancepassword() method with below request:
<?php
namespace App\Http\Controllers\Api\V1;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Http;
use Illuminate\Http\Request;
use Ellaisys\Cognito\Auth\ChangePasswords as CognitoChangePasswords;
class UserController extends Controller
{
use CognitoChangePasswords;
/**
* Post to the Endpoint for changing a password of a User.
*/
public function changepassword(\Illuminate\Http\Request $request)
{
$reset_password = $this->reset($request, 'email', 'password', 'new_password');
return $reset_password;
}
public function getUser()
{
return response()->json(Auth::user());
}
}
When accessing the chancepassword() method with below request:
I get the following error: