如何使用身份驗證 API 觸發密碼重置流程、python 或 curl (How to use the authentication API to trigger password reset flow, python or curl)


問題描述

如何使用身份驗證 API 觸發密碼重置流程、python 或 curl (How to use the authentication API to trigger password reset flow, python or curl)

我正在嘗試通過身份驗證 api 使用 auth0 觸發密碼重置流程。

我不斷收到此錯誤:{"error":"email or username are required."}

按照此處的說明進行操作:https://auth0.com/docs/connections/database/password‑change#using‑the‑authentication‑api

我正在嘗試從 jupyter筆記本電腦或我 Mac 上的終端。我需要對儀表板中的 Allowed web origins 設置做些什麼嗎?

python 請求如下所示:

import requests


payload = "{\"client_id\": \"<MYCLIENTID>\",\"email\": \"<EMAIL>\",\"connection\": \"Username‑Password‑Authentication\"}"

headers = { 'content‑type': "application/json" }

url = "https://<MYDOMAIN>/dbconnections/change_password"

print(requests.post(url, payload).text)

curl 請求如下所示:


參考解法

方法 1:

The connection is disabled errors usually indicate that the connection you are trying to use (Username‑Password‑Authentication), is not enabled on the given Application/Client.

To enable the connection for this Application, go to Applications, select your Application and click on the Connections tab. Here you will see the list of all connections. Make sure the Database connection you are trying to use is enabled. It is advised to have only one enabled Database connection per Client/Application.

(by LudoShayan Memari)

參考文件

  1. How to use the authentication API to trigger password reset flow, python or curl (CC BY‑SA 2.5/3.0/4.0)

#curl #Python #auth0 #HTTPS #python-requests






相關問題

如何在所有 PayPal 交易中退還費用 (How to return fee in all PayPal transactions)

Cú pháp lệnh curl để đăng ký device_token trên Urban Airship là gì? (What is curl command syntax for device_token registration on Urban Airship?)

Nhận thời lượng video trên youtube từ URL với bash (Get youtube video duration from URL with bash)

đăng dữ liệu json với php curl cho đa phần / dữ liệu biểu mẫu để tải lên tệp nếu cakephp 2 (post json data with php curl for multipart/form-data for file upload vía cakephp 2)

ApacheMonitor 上的捲曲錯誤 (Curl error on ApacheMonitor)

從 ASP.net 使用 PHP 中的 POST 數據抓取數據 (Scraping data with POST data in PHP from ASP.net)

收聽推送消息? (Listen to a push message?)

在 PHP 中使用 cURL 的 RAW POST (RAW POST using cURL in PHP)

使用 php 和 curl 更新 mediawiki (using php and curl to update mediawiki)

在 Makefile 中鏈接 cURL (Linking cURL in Makefile)

將我的 .php 輸出發送到 curl 命令,該命令使用機器人在電報上向我發送消息 (Send my .php output to a curl command that messages me on telegram using a bot)

使用 Google My Business API 和 PHP 更新/修補本地帖子 (Updating/Patching a Local Post with Google My Business API and PHP)







留言討論