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

Skip to content

Commit 99b623f

Browse files
authored
Add delete authenticators
Otherwise, we have to get all enrolments and delete them one by one
1 parent 511b016 commit 99b623f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

auth0/v3/management/users.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,17 @@ def delete_multifactor(self, id, provider):
297297
"""
298298
url = self._url('{}/multifactor/{}'.format(id, provider))
299299
return self.client.delete(url)
300+
301+
def delete_authenticators(self, id):
302+
"""Delete all user's MFA enrollments (like the Reset MFA action on the dashboard)
303+
304+
Args:
305+
id (str): The user's id.
306+
307+
See: https://auth0.com/docs/api/management/v2#!/Users/delete_authenticators
308+
"""
309+
url = self._url('{}/authenticators'.format(id))
310+
return self.client.delete(url)
300311

301312
def unlink_user_account(self, id, provider, user_id):
302313
"""Unlink a user account

0 commit comments

Comments
 (0)