auth0 reset password

Solutions on MaxInterview for auth0 reset password by the best coders in the world

showing results for - "auth0 reset password"
Valentín
22 Jul 2020
1$curl = curl_init();
2
3curl_setopt_array($curl, array(
4  CURLOPT_URL => "https://YOUR_DOMAIN/api/v2/users/USER_ID",
5  CURLOPT_RETURNTRANSFER => true,
6  CURLOPT_ENCODING => "",
7  CURLOPT_MAXREDIRS => 10,
8  CURLOPT_TIMEOUT => 30,
9  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
10  CURLOPT_CUSTOMREQUEST => "PATCH",
11  CURLOPT_POSTFIELDS => "{\"password\": \"NEW_PASSWORD\",\"connection\": \"Username-Password-Authentication\"}",
12  CURLOPT_HTTPHEADER => array(
13    "content-type: application/json"
14  ),
15));
16
17$response = curl_exec($curl);
18$err = curl_error($curl);
19
20curl_close($curl);
21
22if ($err) {
23  echo "cURL Error #:" . $err;
24} else {
25  echo $response;
26}