Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f48d45

Browse files
committed
add note in the readme about bot protection
1 parent 62f5da8 commit 8f48d45

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,27 @@ When consuming methods from the API clients, the requests could fail for a numbe
223223
resets is exposed in the ``reset_at`` property. When the header is unset, this value will be ``-1``.
224224
- Network timeouts: Adjustable by passing a ``timeout`` argument to the client. See the `rate limit docs <https://auth0.com/docs/policies/rate-limits>`_ for details.
225225

226+
==============
227+
Bot Protection
228+
==============
229+
230+
If you are using the `Bot Protection <https://auth0.com/docs/anomaly-detection/bot-protection>`_ feature and performing database
231+
login/signup via the Authentication API, you need to handle the ``requires_verification`` error. It indicates that the request was
232+
flagged as suspicious and an additional verification step is necessary to log the user in. That verification step is web-based,
233+
so you need to use Universal Login to complete it.
234+
235+
.. code-block:: python
236+
237+
from auth0.v3.authentication import Database
238+
239+
db = Database('myaccount.auth0.com')
240+
241+
try:
242+
res = db.signup(client_id='my_client_id', email='[email protected]', password='secret', connection='database-1')
243+
except Auth0Error as err:
244+
if (err.error_code == 'requires_verification')
245+
# Use the AuthorizeClient and redirect the user to the Universal Login to complete the authentication
246+
226247
Available Management Endpoints
227248
==============================
228249

0 commit comments

Comments
 (0)